Skip to content

Commit 86a9bc3

Browse files
committed
app dart
1 parent 4ec0c4e commit 86a9bc3

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

lib/app.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import 'package:cookethflow/core/routes/app_route_config.dart';
2+
import 'package:flutter/material.dart';
3+
4+
class MyApp extends StatefulWidget {
5+
const MyApp({super.key});
6+
7+
@override
8+
State<MyApp> createState() => _MyAppState();
9+
}
10+
11+
class _MyAppState extends State<MyApp> {
12+
@override
13+
Widget build(BuildContext context) {
14+
return MaterialApp.router(
15+
debugShowCheckedModeBanner: false,
16+
routerConfig: AppRouteConfig.returnRouter(),
17+
// home: const SplashScreen(),
18+
);
19+
}
20+
}

lib/main.dart

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:cookethflow/app.dart';
12
import 'package:cookethflow/core/routes/app_route_config.dart';
23
import 'package:flutter/material.dart';
34
import 'package:cookethflow/core/services/supabase_service.dart';
@@ -68,22 +69,4 @@ Future<void> main() async {
6869
],
6970
child: const MyApp(),
7071
));
71-
}
72-
73-
class MyApp extends StatefulWidget {
74-
const MyApp({super.key});
75-
76-
@override
77-
State<MyApp> createState() => _MyAppState();
78-
}
79-
80-
class _MyAppState extends State<MyApp> {
81-
@override
82-
Widget build(BuildContext context) {
83-
return MaterialApp.router(
84-
debugShowCheckedModeBanner: false,
85-
routerConfig: AppRouteConfig.returnRouter(),
86-
// home: const SplashScreen(),
87-
);
88-
}
89-
}
72+
}

lib/screens/dashboard_screens/dashboard.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ class Dashboard extends StatelessWidget {
9090
workspaceProvider
9191
.initializeWorkspace(flowId);
9292

93-
context.go('${RoutesPath.workspace}/:$flowId');
94-
// .then((_) =>
95-
// flowProvider.refreshFlowList());
93+
context.go(
94+
'${RoutesPath.workspace}/:$flowId');
95+
flowProvider.refreshFlowList();
96+
// .then((_) =>
97+
// flowProvider.refreshFlowList());
9698
},
9799
);
98100
}

0 commit comments

Comments
 (0)