diff --git a/packages/go_router_builder/example/lib/all_types.g.dart b/packages/go_router_builder/example/lib/all_types.g.dart index 8f3add393eb..65b281d6fbe 100644 --- a/packages/go_router_builder/example/lib/all_types.g.dart +++ b/packages/go_router_builder/example/lib/all_types.g.dart @@ -97,7 +97,7 @@ extension $BigIntRouteExtension on BigIntRoute { String get location => GoRouteData.$location( '/big-int-route/${Uri.encodeComponent(requiredBigIntField.toString())}', - queryParams: { + queryParameters: { if (bigIntField != null) 'big-int-field': bigIntField!.toString(), }, ); @@ -125,7 +125,7 @@ extension $BoolRouteExtension on BoolRoute { String get location => GoRouteData.$location( '/bool-route/${Uri.encodeComponent(requiredBoolField.toString())}', - queryParams: { + queryParameters: { if (boolField != null) 'bool-field': boolField!.toString(), if (boolFieldWithDefaultValue != true) 'bool-field-with-default-value': @@ -151,7 +151,7 @@ extension $DateTimeRouteExtension on DateTimeRoute { String get location => GoRouteData.$location( '/date-time-route/${Uri.encodeComponent(requiredDateTimeField.toString())}', - queryParams: { + queryParameters: { if (dateTimeField != null) 'date-time-field': dateTimeField!.toString(), }, @@ -180,7 +180,7 @@ extension $DoubleRouteExtension on DoubleRoute { String get location => GoRouteData.$location( '/double-route/${Uri.encodeComponent(requiredDoubleField.toString())}', - queryParams: { + queryParameters: { if (doubleField != null) 'double-field': doubleField!.toString(), if (doubleFieldWithDefaultValue != 1.0) 'double-field-with-default-value': @@ -210,7 +210,7 @@ extension $IntRouteExtension on IntRoute { String get location => GoRouteData.$location( '/int-route/${Uri.encodeComponent(requiredIntField.toString())}', - queryParams: { + queryParameters: { if (intField != null) 'int-field': intField!.toString(), if (intFieldWithDefaultValue != 1) 'int-field-with-default-value': intFieldWithDefaultValue.toString(), @@ -239,7 +239,7 @@ extension $NumRouteExtension on NumRoute { String get location => GoRouteData.$location( '/num-route/${Uri.encodeComponent(requiredNumField.toString())}', - queryParams: { + queryParameters: { if (numField != null) 'num-field': numField!.toString(), if (numFieldWithDefaultValue != 1) 'num-field-with-default-value': numFieldWithDefaultValue.toString(), @@ -269,7 +269,7 @@ extension $EnumRouteExtension on EnumRoute { String get location => GoRouteData.$location( '/enum-route/${Uri.encodeComponent(_$PersonDetailsEnumMap[requiredEnumField]!)}', - queryParams: { + queryParameters: { if (enumField != null) 'enum-field': _$PersonDetailsEnumMap[enumField!], if (enumFieldWithDefaultValue != PersonDetails.favoriteFood) @@ -301,7 +301,7 @@ extension $EnhancedEnumRouteExtension on EnhancedEnumRoute { String get location => GoRouteData.$location( '/enhanced-enum-route/${Uri.encodeComponent(_$SportDetailsEnumMap[requiredEnumField]!)}', - queryParams: { + queryParameters: { if (enumField != null) 'enum-field': _$SportDetailsEnumMap[enumField!], if (enumFieldWithDefaultValue != SportDetails.football) @@ -329,7 +329,7 @@ extension $StringRouteExtension on StringRoute { String get location => GoRouteData.$location( '/string-route/${Uri.encodeComponent(requiredStringField)}', - queryParams: { + queryParameters: { if (stringField != null) 'string-field': stringField, if (stringFieldWithDefaultValue != 'defaultValue') 'string-field-with-default-value': stringFieldWithDefaultValue, @@ -353,7 +353,7 @@ extension $UriRouteExtension on UriRoute { String get location => GoRouteData.$location( '/uri-route/${Uri.encodeComponent(requiredUriField.toString())}', - queryParams: { + queryParameters: { if (uriField != null) 'uri-field': uriField!.toString(), }, ); @@ -418,7 +418,7 @@ extension $IterableRouteExtension on IterableRoute { String get location => GoRouteData.$location( '/iterable-route', - queryParams: { + queryParameters: { if (intIterableField != null) 'int-iterable-field': intIterableField?.map((e) => e.toString()).toList(), @@ -544,7 +544,7 @@ extension $IterableRouteWithDefaultValuesExtension String get location => GoRouteData.$location( '/iterable-route-with-default-values', - queryParams: { + queryParameters: { if (intIterableField != const [0]) 'int-iterable-field': intIterableField.map((e) => e.toString()).toList(), diff --git a/packages/go_router_builder/example/lib/main.g.dart b/packages/go_router_builder/example/lib/main.g.dart index 031877e8890..7249c0348a0 100644 --- a/packages/go_router_builder/example/lib/main.g.dart +++ b/packages/go_router_builder/example/lib/main.g.dart @@ -152,7 +152,7 @@ extension $LoginRouteExtension on LoginRoute { String get location => GoRouteData.$location( '/login', - queryParams: { + queryParameters: { if (fromPage != null) 'from-page': fromPage, }, ); diff --git a/packages/go_router_builder/lib/src/route_config.dart b/packages/go_router_builder/lib/src/route_config.dart index a67f33bab05..7ffa099d31a 100644 --- a/packages/go_router_builder/lib/src/route_config.dart +++ b/packages/go_router_builder/lib/src/route_config.dart @@ -416,7 +416,7 @@ GoRouteData.\$route( return ''; } - final StringBuffer buffer = StringBuffer('queryParams: {\n'); + final StringBuffer buffer = StringBuffer('queryParameters: {\n'); for (final ParameterElement param in _ctorQueryParams) { final String parameterName = param.name; diff --git a/packages/go_router_builder/test/test_inputs/_go_router_builder_test_input.dart b/packages/go_router_builder/test/test_inputs/_go_router_builder_test_input.dart index 678a5286e08..829582a04a2 100644 --- a/packages/go_router_builder/test/test_inputs/_go_router_builder_test_input.dart +++ b/packages/go_router_builder/test/test_inputs/_go_router_builder_test_input.dart @@ -125,7 +125,7 @@ extension $DefaultValueRouteExtension on DefaultValueRoute { String get location => GoRouteData.$location( '/default-value-route', - queryParams: { + queryParameters: { if (param != 0) 'param': param.toString(), }, ); @@ -168,7 +168,7 @@ extension $ExtraValueRouteExtension on ExtraValueRoute { String get location => GoRouteData.$location( '/default-value-route', - queryParams: { + queryParameters: { if (param != 0) 'param': param.toString(), }, ); @@ -254,7 +254,7 @@ extension $IterableWithEnumRouteExtension on IterableWithEnumRoute { String get location => GoRouteData.$location( '/iterable-with-enum', - queryParams: { + queryParameters: { if (param != null) 'param': param?.map((e) => _$EnumOnlyUsedInIterableEnumMap[e]).toList(), @@ -308,7 +308,7 @@ extension $IterableDefaultValueRouteExtension on IterableDefaultValueRoute { String get location => GoRouteData.$location( '/iterable-default-value-route', - queryParams: { + queryParameters: { if (param != const [0]) 'param': param.map((e) => e.toString()).toList(), },