1
0
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:
Brett Morgan
2023-05-24 04:29:36 +10:00
committed by GitHub
parent 0b2c5f8c0f
commit 2ca81b3891

View File

@@ -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,