11
11
// ignore_for_file: type=lint
12
12
13
13
// ignore_for_file: no_leading_underscores_for_library_prefixes
14
- import 'package:auto_route/auto_route.dart' as _i7;
15
- import 'package:flutter/material.dart' as _i8;
14
+ import 'package:auto_route/auto_route.dart' as _i9;
15
+ import 'package:auto_route/empty_router_widgets.dart' as _i5;
16
+ import 'package:flutter/material.dart' as _i10;
16
17
18
+ import '../screens/add_meal.dart' as _i8;
17
19
import '../screens/chat.dart' as _i4;
18
- import '../screens/diary.dart' as _i5 ;
20
+ import '../screens/diary.dart' as _i7 ;
19
21
import '../screens/home.dart' as _i1;
20
22
import '../screens/login.dart' as _i2;
21
23
import '../screens/profile.dart' as _i6;
22
24
import '../screens/register.dart' as _i3;
23
25
24
- class AppRouter extends _i7 .RootStackRouter {
25
- AppRouter ([_i8 .GlobalKey <_i8 .NavigatorState >? navigatorKey])
26
+ class AppRouter extends _i9 .RootStackRouter {
27
+ AppRouter ([_i10 .GlobalKey <_i10 .NavigatorState >? navigatorKey])
26
28
: super (navigatorKey);
27
29
28
30
@override
29
- final Map <String , _i7 .PageFactory > pagesMap = {
31
+ final Map <String , _i9 .PageFactory > pagesMap = {
30
32
HomeScreenRoute .name: (routeData) {
31
- return _i7 .MaterialPageX <dynamic >(
33
+ return _i9 .MaterialPageX <dynamic >(
32
34
routeData: routeData, child: const _i1.HomeScreen ());
33
35
},
34
36
LoginScreenRoute .name: (routeData) {
35
- return _i7 .MaterialPageX <dynamic >(
37
+ return _i9 .MaterialPageX <dynamic >(
36
38
routeData: routeData, child: const _i2.LoginScreen ());
37
39
},
38
40
RegisterScreenRoute .name: (routeData) {
39
- return _i7 .MaterialPageX <dynamic >(
41
+ return _i9 .MaterialPageX <dynamic >(
40
42
routeData: routeData, child: const _i3.RegisterScreen ());
41
43
},
42
44
ChatScreenRoute .name: (routeData) {
43
- return _i7 .MaterialPageX <dynamic >(
45
+ return _i9 .MaterialPageX <dynamic >(
44
46
routeData: routeData, child: const _i4.ChatScreen ());
45
47
},
46
- DiaryScreenRoute .name: (routeData) {
47
- return _i7 .MaterialPageX <dynamic >(
48
- routeData: routeData, child: const _i5.DiaryScreen ());
48
+ DiaryRouterPage .name: (routeData) {
49
+ return _i9 .MaterialPageX <dynamic >(
50
+ routeData: routeData, child: const _i5.EmptyRouterPage ());
49
51
},
50
52
ProfileScreenRoute .name: (routeData) {
51
- return _i7 .MaterialPageX <dynamic >(
53
+ return _i9 .MaterialPageX <dynamic >(
52
54
routeData: routeData, child: const _i6.ProfileScreen ());
55
+ },
56
+ DiaryScreenRoute .name: (routeData) {
57
+ return _i9.MaterialPageX <dynamic >(
58
+ routeData: routeData, child: const _i7.DiaryScreen ());
59
+ },
60
+ AddMealScreenRoute .name: (routeData) {
61
+ return _i9.MaterialPageX <dynamic >(
62
+ routeData: routeData, child: const _i8.AddMealScreen ());
53
63
}
54
64
};
55
65
56
66
@override
57
- List <_i7 .RouteConfig > get routes => [
58
- _i7 .RouteConfig ('/#redirect' ,
67
+ List <_i9 .RouteConfig > get routes => [
68
+ _i9 .RouteConfig ('/#redirect' ,
59
69
path: '/' , redirectTo: '/home' , fullMatch: true ),
60
- _i7 .RouteConfig (HomeScreenRoute .name, path: '/home' , children: [
61
- _i7 .RouteConfig ('#redirect' ,
70
+ _i9 .RouteConfig (HomeScreenRoute .name, path: '/home' , children: [
71
+ _i9 .RouteConfig ('#redirect' ,
62
72
path: '' ,
63
73
parent: HomeScreenRoute .name,
64
74
redirectTo: 'diary' ,
65
75
fullMatch: true ),
66
- _i7 .RouteConfig (ChatScreenRoute .name,
76
+ _i9 .RouteConfig (ChatScreenRoute .name,
67
77
path: 'chat' , parent: HomeScreenRoute .name),
68
- _i7.RouteConfig (DiaryScreenRoute .name,
69
- path: 'diary' , parent: HomeScreenRoute .name),
70
- _i7.RouteConfig (ProfileScreenRoute .name,
78
+ _i9.RouteConfig (DiaryRouterPage .name,
79
+ path: 'diary' ,
80
+ parent: HomeScreenRoute .name,
81
+ children: [
82
+ _i9.RouteConfig (DiaryScreenRoute .name,
83
+ path: '' , parent: DiaryRouterPage .name),
84
+ _i9.RouteConfig (AddMealScreenRoute .name,
85
+ path: 'add' , parent: DiaryRouterPage .name)
86
+ ]),
87
+ _i9.RouteConfig (ProfileScreenRoute .name,
71
88
path: 'my' , parent: HomeScreenRoute .name)
72
89
]),
73
- _i7 .RouteConfig (LoginScreenRoute .name, path: '/login' ),
74
- _i7 .RouteConfig (RegisterScreenRoute .name, path: '/register' ),
75
- _i7 .RouteConfig ('*#redirect' ,
90
+ _i9 .RouteConfig (LoginScreenRoute .name, path: '/login' ),
91
+ _i9 .RouteConfig (RegisterScreenRoute .name, path: '/register' ),
92
+ _i9 .RouteConfig ('*#redirect' ,
76
93
path: '*' , redirectTo: '/home/diary' , fullMatch: true )
77
94
];
78
95
}
79
96
80
97
/// generated route for
81
98
/// [_i1.HomeScreen]
82
- class HomeScreenRoute extends _i7 .PageRouteInfo <void > {
83
- const HomeScreenRoute ({List <_i7 .PageRouteInfo >? children})
99
+ class HomeScreenRoute extends _i9 .PageRouteInfo <void > {
100
+ const HomeScreenRoute ({List <_i9 .PageRouteInfo >? children})
84
101
: super (HomeScreenRoute .name, path: '/home' , initialChildren: children);
85
102
86
103
static const String name = 'HomeScreenRoute' ;
87
104
}
88
105
89
106
/// generated route for
90
107
/// [_i2.LoginScreen]
91
- class LoginScreenRoute extends _i7 .PageRouteInfo <void > {
108
+ class LoginScreenRoute extends _i9 .PageRouteInfo <void > {
92
109
const LoginScreenRoute () : super (LoginScreenRoute .name, path: '/login' );
93
110
94
111
static const String name = 'LoginScreenRoute' ;
95
112
}
96
113
97
114
/// generated route for
98
115
/// [_i3.RegisterScreen]
99
- class RegisterScreenRoute extends _i7 .PageRouteInfo <void > {
116
+ class RegisterScreenRoute extends _i9 .PageRouteInfo <void > {
100
117
const RegisterScreenRoute ()
101
118
: super (RegisterScreenRoute .name, path: '/register' );
102
119
@@ -105,24 +122,41 @@ class RegisterScreenRoute extends _i7.PageRouteInfo<void> {
105
122
106
123
/// generated route for
107
124
/// [_i4.ChatScreen]
108
- class ChatScreenRoute extends _i7 .PageRouteInfo <void > {
125
+ class ChatScreenRoute extends _i9 .PageRouteInfo <void > {
109
126
const ChatScreenRoute () : super (ChatScreenRoute .name, path: 'chat' );
110
127
111
128
static const String name = 'ChatScreenRoute' ;
112
129
}
113
130
114
131
/// generated route for
115
- /// [_i5.DiaryScreen]
116
- class DiaryScreenRoute extends _i7.PageRouteInfo <void > {
117
- const DiaryScreenRoute () : super (DiaryScreenRoute .name, path: 'diary' );
132
+ /// [_i5.EmptyRouterPage]
133
+ class DiaryRouterPage extends _i9.PageRouteInfo <void > {
134
+ const DiaryRouterPage ({List <_i9.PageRouteInfo >? children})
135
+ : super (DiaryRouterPage .name, path: 'diary' , initialChildren: children);
118
136
119
- static const String name = 'DiaryScreenRoute ' ;
137
+ static const String name = 'DiaryRouterPage ' ;
120
138
}
121
139
122
140
/// generated route for
123
141
/// [_i6.ProfileScreen]
124
- class ProfileScreenRoute extends _i7 .PageRouteInfo <void > {
142
+ class ProfileScreenRoute extends _i9 .PageRouteInfo <void > {
125
143
const ProfileScreenRoute () : super (ProfileScreenRoute .name, path: 'my' );
126
144
127
145
static const String name = 'ProfileScreenRoute' ;
128
146
}
147
+
148
+ /// generated route for
149
+ /// [_i7.DiaryScreen]
150
+ class DiaryScreenRoute extends _i9.PageRouteInfo <void > {
151
+ const DiaryScreenRoute () : super (DiaryScreenRoute .name, path: '' );
152
+
153
+ static const String name = 'DiaryScreenRoute' ;
154
+ }
155
+
156
+ /// generated route for
157
+ /// [_i8.AddMealScreen]
158
+ class AddMealScreenRoute extends _i9.PageRouteInfo <void > {
159
+ const AddMealScreenRoute () : super (AddMealScreenRoute .name, path: 'add' );
160
+
161
+ static const String name = 'AddMealScreenRoute' ;
162
+ }
0 commit comments