update
This commit is contained in:
parent
4a93adf463
commit
2cd3e589db
1 changed files with 17 additions and 5 deletions
|
@ -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 {
|
class ActiveFlowPage extends StatelessWidget {
|
||||||
final API.Flow flow;
|
final API.Flow flow;
|
||||||
final API.FlowInfo info;
|
final API.FlowInfo info;
|
||||||
|
@ -382,12 +395,11 @@ class ActiveFlowPage extends StatelessWidget {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text(info.name),
|
title: Text(info.name),
|
||||||
actions: [
|
actions: [
|
||||||
// todo : end flow
|
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (info.produces?.isNotEmpty ?? false) {
|
if (info.produces?.isNotEmpty ?? false) {
|
||||||
// todo : show end screen with produce
|
Navigator.of(context).push(MaterialPageRoute(
|
||||||
|
builder: (context) => EndFlowWithProduce(flow, info)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,7 +408,7 @@ class ActiveFlowPage extends StatelessWidget {
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AlertDialog(
|
builder: (context) => AlertDialog(
|
||||||
title: const Text('Are you sure?'),
|
title: const Text('Are you sure?'),
|
||||||
content: const Text('This will delete the flow.'),
|
content: const Text('This will end the flow.'),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.of(context).pop(false),
|
onPressed: () => Navigator.of(context).pop(false),
|
||||||
|
@ -404,7 +416,7 @@ class ActiveFlowPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () => Navigator.of(context).pop(true),
|
onPressed: () => Navigator.of(context).pop(true),
|
||||||
child: const Text('Delete'),
|
child: const Text('End'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue