File tree Expand file tree Collapse file tree 5 files changed +48
-2
lines changed
packages/go_router_builder Expand file tree Collapse file tree 5 files changed +48
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## 2.3.4
2
+
3
+ * Fixes a bug of typeArguments losing NullabilitySuffix
4
+
1
5
## 2.3.3
2
6
3
7
* Adds ` initialLocation ` for ` StatefulShellBranchConfig `
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ String enumMapName(InterfaceType type) => '_\$${type.element.name}EnumMap';
94
94
95
95
String _stateValueAccess (ParameterElement element, Set <String > pathParameters) {
96
96
if (element.isExtraField) {
97
- return 'extra as ${element .type .getDisplayString (withNullability : element . isOptional )}' ;
97
+ return 'extra as ${element .type .getDisplayString (withNullability : true )}' ;
98
98
}
99
99
100
100
late String access;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: go_router_builder
2
2
description : >-
3
3
A builder that supports generated strongly-typed route helpers for
4
4
package:go_router
5
- version : 2.3.3
5
+ version : 2.3.4
6
6
repository : https://github.com/flutter/packages/tree/main/packages/go_router_builder
7
7
issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router_builder%22
8
8
Original file line number Diff line number Diff line change
1
+ // Copyright 2013 The Flutter Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import 'package:go_router/go_router.dart' ;
6
+
7
+ @TypedGoRoute < RequiredNullableTypeArgumentsExtraValueRoute > (
8
+ path: '/default-value-route' )
9
+ class RequiredNullableTypeArgumentsExtraValueRoute extends GoRouteData {
10
+ RequiredNullableTypeArgumentsExtraValueRoute ({required this .$extra});
11
+ final List <int ?> $extra;
12
+ }
Original file line number Diff line number Diff line change
1
+ RouteBase get $requiredNullableTypeArgumentsExtraValueRoute =>
2
+ GoRouteData.$route(
3
+ path: '/default-value-route',
4
+ factory:
5
+ $RequiredNullableTypeArgumentsExtraValueRouteExtension._fromState,
6
+ );
7
+
8
+ extension $RequiredNullableTypeArgumentsExtraValueRouteExtension
9
+ on RequiredNullableTypeArgumentsExtraValueRoute {
10
+ static RequiredNullableTypeArgumentsExtraValueRoute _fromState(
11
+ GoRouterState state) =>
12
+ RequiredNullableTypeArgumentsExtraValueRoute(
13
+ $extra: state.extra as List<int?>,
14
+ );
15
+
16
+ String get location => GoRouteData.$location(
17
+ '/default-value-route',
18
+ );
19
+
20
+ void go(BuildContext context) => context.go(location, extra: $extra);
21
+
22
+ Future<T?> push<T>(BuildContext context) =>
23
+ context.push<T>(location, extra: $extra);
24
+
25
+ void pushReplacement(BuildContext context) =>
26
+ context.pushReplacement(location, extra: $extra);
27
+
28
+ void replace(BuildContext context) =>
29
+ context.replace(location, extra: $extra);
30
+ }
You can’t perform that action at this time.
0 commit comments