Skip to content

Commit 6d653a2

Browse files
committed
Update readme
1 parent 8810d23 commit 6d653a2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/go_router_builder/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ method.
8686

8787
<?code-excerpt "example/lib/readme_excerpts.dart (HomeRoute)"?>
8888
```dart
89-
class HomeRoute extends GoRouteData with _$HomeRoute {
89+
class HomeRoute extends GoRouteData with $HomeRoute {
9090
const HomeRoute();
9191
9292
@override
@@ -108,7 +108,7 @@ The tree of routes is defined as an attribute on each of the top-level routes:
108108
),
109109
],
110110
)
111-
class HomeRoute extends GoRouteData with _$HomeRoute {
111+
class HomeRoute extends GoRouteData with $HomeRoute {
112112
const HomeRoute();
113113
114114
@override
@@ -124,7 +124,7 @@ class RedirectRoute extends GoRouteData {
124124
}
125125
126126
@TypedGoRoute<LoginRoute>(path: '/login')
127-
class LoginRoute extends GoRouteData with _$LoginRoute {
127+
class LoginRoute extends GoRouteData with $LoginRoute {
128128
LoginRoute({this.from});
129129
final String? from;
130130
@@ -211,7 +211,7 @@ Parameters (named or positional) not listed in the path of `TypedGoRoute` indica
211211
<?code-excerpt "example/lib/readme_excerpts.dart (login)"?>
212212
```dart
213213
@TypedGoRoute<LoginRoute>(path: '/login')
214-
class LoginRoute extends GoRouteData with _$LoginRoute {
214+
class LoginRoute extends GoRouteData with $LoginRoute {
215215
LoginRoute({this.from});
216216
final String? from;
217217
@@ -229,7 +229,7 @@ For query parameters with a **non-nullable** type, you can define a default valu
229229
<?code-excerpt "example/lib/readme_excerpts.dart (MyRoute)"?>
230230
```dart
231231
@TypedGoRoute<MyRoute>(path: '/my-route')
232-
class MyRoute extends GoRouteData with _$MyRoute {
232+
class MyRoute extends GoRouteData with $MyRoute {
233233
MyRoute({this.queryParameter = 'defaultValue'});
234234
final String queryParameter;
235235
@@ -250,7 +250,7 @@ parameter with the special name `$extra`:
250250

251251
<?code-excerpt "example/lib/readme_excerpts.dart (PersonRouteWithExtra)"?>
252252
```dart
253-
class PersonRouteWithExtra extends GoRouteData with _$PersonRouteWithExtra {
253+
class PersonRouteWithExtra extends GoRouteData with $PersonRouteWithExtra {
254254
PersonRouteWithExtra(this.$extra);
255255
final Person? $extra;
256256
@@ -282,7 +282,7 @@ You can, of course, combine the use of path, query and $extra parameters:
282282
```dart
283283
@TypedGoRoute<HotdogRouteWithEverything>(path: '/:ketchup')
284284
class HotdogRouteWithEverything extends GoRouteData
285-
with _$HotdogRouteWithEverything {
285+
with $HotdogRouteWithEverything {
286286
HotdogRouteWithEverything(this.ketchup, this.mustard, this.$extra);
287287
final bool ketchup; // A required path parameter.
288288
final String? mustard; // An optional query parameter.
@@ -342,7 +342,7 @@ The code generator can convert simple types like `int` and `enum` to/from the
342342
enum BookKind { all, popular, recent }
343343
344344
@TypedGoRoute<BooksRoute>(path: '/books')
345-
class BooksRoute extends GoRouteData with _$BooksRoute {
345+
class BooksRoute extends GoRouteData with $BooksRoute {
346346
BooksRoute({this.kind = BookKind.popular});
347347
final BookKind kind;
348348
@@ -371,7 +371,7 @@ method of the base class instead of the `build` method:
371371

372372
<?code-excerpt "example/lib/readme_excerpts.dart (MyMaterialRouteWithKey)"?>
373373
```dart
374-
class MyMaterialRouteWithKey extends GoRouteData with _$MyMaterialRouteWithKey {
374+
class MyMaterialRouteWithKey extends GoRouteData with $MyMaterialRouteWithKey {
375375
const MyMaterialRouteWithKey();
376376
static const LocalKey _key = ValueKey<String>('my-route-with-key');
377377
@override
@@ -390,7 +390,7 @@ Overriding the `buildPage` method is also useful for custom transitions:
390390

391391
<?code-excerpt "example/lib/readme_excerpts.dart (FancyRoute)"?>
392392
```dart
393-
class FancyRoute extends GoRouteData with _$FancyRoute {
393+
class FancyRoute extends GoRouteData with $FancyRoute {
394394
const FancyRoute();
395395
@override
396396
CustomTransitionPage<void> buildPage(
@@ -441,7 +441,7 @@ class MyShellRouteData extends ShellRouteData {
441441
}
442442
443443
// For GoRoutes:
444-
class MyGoRouteData extends GoRouteData with _$MyGoRouteData {
444+
class MyGoRouteData extends GoRouteData with $MyGoRouteData {
445445
const MyGoRouteData();
446446
447447
static final GlobalKey<NavigatorState> $parentNavigatorKey = rootNavigatorKey;

0 commit comments

Comments
 (0)