File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
+ import 'package:flutter_news_app/feature/presentation/page/dashboard/dashboard_page.dart' ;
3
+ import 'package:flutter_news_app/feature/presentation/page/login/login_page.dart' ;
4
+ import 'package:flutter_news_app/feature/presentation/page/splash/splash_page.dart' ;
2
5
3
6
class AppRoute {
4
7
static Route <dynamic > onGenerateRoute (RouteSettings settings) {
5
- Map <String , dynamic >? arguments;
8
+ /* Map<String, dynamic>? arguments;
6
9
if (settings.arguments is Map<String, dynamic>?) {
7
10
arguments = settings.arguments as Map<String, dynamic>?;
8
- }
9
- final routes = < String , WidgetBuilder > {};
11
+ }*/
12
+ final routes = < String , WidgetBuilder > {
13
+ SplashPage .routeName: (context) {
14
+ return const SplashPage ();
15
+ },
16
+ LoginPage .routeName: (context) {
17
+ return const LoginPage ();
18
+ },
19
+ DashboardPage .routeName: (context) {
20
+ return const DashboardPage ();
21
+ },
22
+ };
10
23
final builder = routes[settings.name];
11
24
return MaterialPageRoute (
12
25
builder: (context) => builder !(context),
You can’t perform that action at this time.
0 commit comments