From 2cd3e589db4d197456940e074922f2e5c8ebc401 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Tue, 24 Sep 2024 15:59:16 +0200 Subject: [PATCH] update --- lib/pages/flow.dart | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/pages/flow.dart b/lib/pages/flow.dart index 1271651..7a286fb 100644 --- a/lib/pages/flow.dart +++ b/lib/pages/flow.dart @@ -370,6 +370,19 @@ class TransactionSelectPage extends StatelessWidget { } } +class EndFlowWithProduce extends StatelessWidget { + final API.Flow flow; + final API.FlowInfo info; + + const EndFlowWithProduce(this.flow, this.info, {super.key}); + + @override + Widget build(BuildContext context) { + // todo : show end screen with produce + return Scaffold(); + } +} + class ActiveFlowPage extends StatelessWidget { final API.Flow flow; final API.FlowInfo info; @@ -382,12 +395,11 @@ class ActiveFlowPage extends StatelessWidget { appBar: AppBar( title: Text(info.name), actions: [ - // todo : end flow IconButton( onPressed: () async { if (info.produces?.isNotEmpty ?? false) { - // todo : show end screen with produce - + Navigator.of(context).push(MaterialPageRoute( + builder: (context) => EndFlowWithProduce(flow, info))); return; } @@ -396,7 +408,7 @@ class ActiveFlowPage extends StatelessWidget { context: context, builder: (context) => AlertDialog( title: const Text('Are you sure?'), - content: const Text('This will delete the flow.'), + content: const Text('This will end the flow.'), actions: [ TextButton( onPressed: () => Navigator.of(context).pop(false), @@ -404,7 +416,7 @@ class ActiveFlowPage extends StatelessWidget { ), ElevatedButton( onPressed: () => Navigator.of(context).pop(true), - child: const Text('Delete'), + child: const Text('End'), ), ], ),