From b2c2efc4b0729a1fdfb18c39b55b041a3df8593f Mon Sep 17 00:00:00 2001 From: David Iglesias Date: Tue, 30 Apr 2024 16:29:05 -0700 Subject: [PATCH] [go_router_builder] Tweaks for latest analyzer-6.5.0 (#6632) 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: https://github.com/flutter/packages/pull/6631 --- packages/go_router_builder/CHANGELOG.md | 5 +++++ packages/go_router_builder/lib/src/type_helpers.dart | 3 ++- packages/go_router_builder/pubspec.yaml | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/go_router_builder/CHANGELOG.md b/packages/go_router_builder/CHANGELOG.md index e4ea9f6782ce..2a490e34200e 100644 --- a/packages/go_router_builder/CHANGELOG.md +++ b/packages/go_router_builder/CHANGELOG.md @@ -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. diff --git a/packages/go_router_builder/lib/src/type_helpers.dart b/packages/go_router_builder/lib/src/type_helpers.dart index a22edc8310d0..94ddcd0a6e7c 100644 --- a/packages/go_router_builder/lib/src/type_helpers.dart +++ b/packages/go_router_builder/lib/src/type_helpers.dart @@ -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'; @@ -91,6 +91,7 @@ String enumMapName(InterfaceType type) => '_\$${type.element.name}EnumMap'; String _stateValueAccess(ParameterElement element, Set pathParameters) { if (element.isExtraField) { + // ignore: avoid_redundant_argument_values return 'extra as ${element.type.getDisplayString(withNullability: true)}'; } diff --git a/packages/go_router_builder/pubspec.yaml b/packages/go_router_builder/pubspec.yaml index c5a656334ff7..c64c3341243e 100644 --- a/packages/go_router_builder/pubspec.yaml +++ b/packages/go_router_builder/pubspec.yaml @@ -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 @@ -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