mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
next_gen_ui_demo: Add restart button (#1835)
This commit is contained in:
@@ -129,6 +129,24 @@ class _NextGenAppState extends State<NextGenApp> {
|
||||
},
|
||||
),
|
||||
),
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user