@@ -6,11 +6,8 @@ Routefly is a folder-based route manager inspired by NextJS and created by the F
6
6
7
7
** Example:**
8
8
9
- - ` /lib/app/dashboard/dashboard_page.dart ` => ` /dashboard `
10
- - ` /lib/app/users/users_page.dart ` => ` /users `
11
- - ` /lib/app/users/[id]_page.dart ` => ` /users/2 `
12
9
13
- ![ Logo] ( https://github.com/Flutterando/routefly/blob/main/assets/images/nested_navigation.gif ?raw=true )
10
+ ![ Logo] ( https://github.com/Flutterando/routefly/blob/main/assets/images/routefly_scheme.png ?raw=true )
14
11
15
12
## Installation and Initialization
16
13
@@ -32,7 +29,7 @@ class MyApp extends StatelessWidget {
32
29
Widget build(BuildContext context) {
33
30
return MaterialApp.router(
34
31
routerDelegate: Routefly.routerConfig(
35
- routes: routes,
32
+ routes: routes, // GENERATED
36
33
),
37
34
);
38
35
}
@@ -71,8 +68,8 @@ A route group can be created by wrapping a folder's name in parenthesis: `(folde
71
68
.
72
69
└── app/
73
70
├── (product)/
74
- │ └── home/
75
- └── home_page.dart
71
+ └── home/
72
+ └── home_page.dart
76
73
```
77
74
Generate => ` /home ` ;
78
75
@@ -147,11 +144,11 @@ It is also possible to change the global transition of the routes:
147
144
``` dart
148
145
@override
149
146
Widget build(BuildContext context) {
150
- return MaterialApp .router(
147
+ return CupertinoApp .router(
151
148
routerConfig: Routefly.routerConfig(
152
149
routes: routes,
153
150
routeBuilder: (context, settings, child) {
154
- return MaterialPageRoute (
151
+ return CupertinoPageRoute (
155
152
settings: settings, // !! IMPORTANT !!
156
153
builder: (context) => child,
157
154
);
@@ -183,14 +180,10 @@ In the Layout Widget, add `RouterOutlet()` wherever you prefer nested routes to
183
180
ex:
184
181
185
182
``` dart
186
- ...
187
- Expanded(
188
- flex: 3,
189
- child: RouterOutlet(),
190
- ),
191
- ...
183
+ RouterOutlet(),
192
184
193
185
```
186
+ ![ Logo] ( https://github.com/Flutterando/routefly/blob/main/assets/images/nested_navigation.gif?raw=true )
194
187
195
188
## Middleware
196
189
0 commit comments