Skip to content

Commit

Permalink
[go_router_builder] Tweaks for latest analyzer-6.5.0 (flutter#6632)
Browse files Browse the repository at this point in the history
This PR slightly tweaks `go_router_builder` to work with `analyzer-6.5.0` and unblock post-submit [errors](https://github.com/flutter/packages/runs/24440595710).

## Issues

* Should fix failing tests after this merge: flutter#6631
  • Loading branch information
ditman authored and TecHaxter committed May 22, 2024
1 parent 54dcf2b commit b2c2efc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/go_router_builder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.6.1

* Fixes typo in `durationDecoderHelperName`.
* Updates development dependency to `dart_style-2.3.6` (compatible with `analyzer-6.5.0`).

## 2.6.0

* Adds support for passing observers to the StatefulShellBranch for the nested Navigator.
Expand Down
3 changes: 2 additions & 1 deletion packages/go_router_builder/lib/src/type_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const String convertMapValueHelperName = r'_$convertMapValue';

/// The name of the generated, private helper for converting [Duration] to
/// [bool].
const String durationDecoderHelperName = r'_$duractionConverter';
const String durationDecoderHelperName = r'_$durationConverter';

/// The name of the generated, private helper for converting [String] to [Enum].
const String enumExtensionHelperName = r'_$fromName';
Expand Down Expand Up @@ -91,6 +91,7 @@ String enumMapName(InterfaceType type) => '_\$${type.element.name}EnumMap';

String _stateValueAccess(ParameterElement element, Set<String> pathParameters) {
if (element.isExtraField) {
// ignore: avoid_redundant_argument_values
return 'extra as ${element.type.getDisplayString(withNullability: true)}';
}

Expand Down
4 changes: 2 additions & 2 deletions packages/go_router_builder/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: go_router_builder
description: >-
A builder that supports generated strongly-typed route helpers for
package:go_router
version: 2.6.0
version: 2.6.1
repository: https://github.com/flutter/packages/tree/main/packages/go_router_builder
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router_builder%22

Expand All @@ -23,7 +23,7 @@ dependencies:

dev_dependencies:
build_test: ^2.1.7
dart_style: 2.3.2
dart_style: 2.3.6
flutter:
sdk: flutter
go_router: ^10.0.0
Expand Down

0 comments on commit b2c2efc

Please sign in to comment.