@@ -86,7 +86,7 @@ method.
86
86
87
87
<? code-excerpt "example/lib/readme_excerpts.dart (HomeRoute)"?>
88
88
``` dart
89
- class HomeRoute extends GoRouteData {
89
+ class HomeRoute extends GoRouteData with _$HomeRoute {
90
90
const HomeRoute();
91
91
92
92
@override
@@ -108,7 +108,7 @@ The tree of routes is defined as an attribute on each of the top-level routes:
108
108
),
109
109
],
110
110
)
111
- class HomeRoute extends GoRouteData {
111
+ class HomeRoute extends GoRouteData with _$HomeRoute {
112
112
const HomeRoute();
113
113
114
114
@override
@@ -124,7 +124,7 @@ class RedirectRoute extends GoRouteData {
124
124
}
125
125
126
126
@TypedGoRoute<LoginRoute>(path: '/login')
127
- class LoginRoute extends GoRouteData {
127
+ class LoginRoute extends GoRouteData with _$LoginRoute {
128
128
LoginRoute({this.from});
129
129
final String? from;
130
130
@@ -211,7 +211,7 @@ Parameters (named or positional) not listed in the path of `TypedGoRoute` indica
211
211
<? code-excerpt "example/lib/readme_excerpts.dart (login)"?>
212
212
``` dart
213
213
@TypedGoRoute<LoginRoute>(path: '/login')
214
- class LoginRoute extends GoRouteData {
214
+ class LoginRoute extends GoRouteData with _$LoginRoute {
215
215
LoginRoute({this.from});
216
216
final String? from;
217
217
@@ -229,7 +229,7 @@ For query parameters with a **non-nullable** type, you can define a default valu
229
229
<? code-excerpt "example/lib/readme_excerpts.dart (MyRoute)"?>
230
230
``` dart
231
231
@TypedGoRoute<MyRoute>(path: '/my-route')
232
- class MyRoute extends GoRouteData {
232
+ class MyRoute extends GoRouteData with _$MyRoute {
233
233
MyRoute({this.queryParameter = 'defaultValue'});
234
234
final String queryParameter;
235
235
@@ -250,7 +250,7 @@ parameter with the special name `$extra`:
250
250
251
251
<? code-excerpt "example/lib/readme_excerpts.dart (PersonRouteWithExtra)"?>
252
252
``` dart
253
- class PersonRouteWithExtra extends GoRouteData {
253
+ class PersonRouteWithExtra extends GoRouteData with _$PersonRouteWithExtra {
254
254
PersonRouteWithExtra(this.$extra);
255
255
final Person? $extra;
256
256
@@ -281,7 +281,8 @@ You can, of course, combine the use of path, query and $extra parameters:
281
281
<? code-excerpt "example/lib/readme_excerpts.dart (HotdogRouteWithEverything)"?>
282
282
``` dart
283
283
@TypedGoRoute<HotdogRouteWithEverything>(path: '/:ketchup')
284
- class HotdogRouteWithEverything extends GoRouteData {
284
+ class HotdogRouteWithEverything extends GoRouteData
285
+ with _$HotdogRouteWithEverything {
285
286
HotdogRouteWithEverything(this.ketchup, this.mustard, this.$extra);
286
287
final bool ketchup; // A required path parameter.
287
288
final String? mustard; // An optional query parameter.
0 commit comments