From 2ca81b3891908be095253e5bd73c89e2ce41af2a Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Wed, 24 May 2023 04:29:36 +1000 Subject: [PATCH] `next_gen_ui_demo`: Add restart button (#1835) --- next_gen_ui_demo/lib/main.dart | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/next_gen_ui_demo/lib/main.dart b/next_gen_ui_demo/lib/main.dart index f34576ee1..b39b9e3da 100644 --- a/next_gen_ui_demo/lib/main.dart +++ b/next_gen_ui_demo/lib/main.dart @@ -129,6 +129,24 @@ class _NextGenAppState extends State { }, ), ), + Visibility( + visible: step + 1 == steps.length, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Gap(24), + FloatingActionButton( + child: const Icon(Icons.restart_alt), + onPressed: () { + setState(() { + step = 0; + debugPrint('Step = $step'); + }); + }, + ), + ], + ), + ), ], ), backgroundColor: Colors.black,