Line data Source code
1 : // Copyright 2023 The terCAD team. All rights reserved.
2 : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
3 :
4 : import 'package:app_finance/_classes/storage/app_data.dart';
5 : import 'package:app_finance/_classes/structure/interface_app_data.dart';
6 : import 'package:material_ui/material_ui.dart';
7 :
8 : class FlowStateMachine {
9 0 : static void deactivate(NavigatorState? nav, {required AppData store, String? uuid, InterfaceAppData? data}) {
10 0 : assert(uuid != null || data != null);
11 0 : final obj = data ?? store.getByUuid(uuid!);
12 0 : obj.deactivate();
13 0 : store.update(obj.uuid, obj);
14 0 : store.restate();
15 0 : nav?.pop();
16 : }
17 : }
|