From 9028138d35f6d68b059a32538a1404d85c5b1d68 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 17 Nov 2023 13:19:55 -0500 Subject: [PATCH] [go_router] Fixes use of `Iterable` Replaces an `extends Iterable` with `implements Iterable` for Dart 3.0 compatibility, and updates the minimum version of the Dart SDK to 3.0 to test it. This helps unblock rolling the entire repo forward to Flutter 3.10/Dart 3.0 as a minimum version. --- packages/go_router/CHANGELOG.md | 7 ++++++- packages/go_router/example/pubspec.yaml | 4 ++-- packages/go_router/lib/src/delegate.dart | 2 +- packages/go_router/pubspec.yaml | 6 +++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/go_router/CHANGELOG.md b/packages/go_router/CHANGELOG.md index fe4b38e0636..b62f174d7fb 100644 --- a/packages/go_router/CHANGELOG.md +++ b/packages/go_router/CHANGELOG.md @@ -1,3 +1,8 @@ +## 12.1.2 + +* Fixes an incorrect use of `extends` for Dart 3 compatibility. +* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0. + ## 12.1.1 - Retains query parameters during refresh and first redirect. @@ -75,7 +80,7 @@ ## 10.1.1 -- Fixes mapping from `Page` to `RouteMatch`s. +- Fixes mapping from `Page` to `RouteMatch`s. - Updates minimum supported SDK version to Flutter 3.7/Dart 2.19. ## 10.1.0 diff --git a/packages/go_router/example/pubspec.yaml b/packages/go_router/example/pubspec.yaml index 3ff5906016d..226ef8cddbf 100644 --- a/packages/go_router/example/pubspec.yaml +++ b/packages/go_router/example/pubspec.yaml @@ -4,8 +4,8 @@ version: 3.0.1 publish_to: none environment: - sdk: ">=2.19.0 <4.0.0" - flutter: ">=3.7.0" + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" dependencies: adaptive_navigation: ^0.0.4 diff --git a/packages/go_router/lib/src/delegate.dart b/packages/go_router/lib/src/delegate.dart index bcd737a6536..756eba28d79 100644 --- a/packages/go_router/lib/src/delegate.dart +++ b/packages/go_router/lib/src/delegate.dart @@ -247,7 +247,7 @@ class GoRouterDelegate extends RouterDelegate /// The iterator starts with the navigator that hosts the top-most route. This /// navigator may not be the inner-most navigator if the top-most route is a /// pageless route, such as a dialog or bottom sheet. -class _NavigatorStateIterator extends Iterator { +class _NavigatorStateIterator implements Iterator { _NavigatorStateIterator(this.matchList, this.root) : index = matchList.matches.length - 1; diff --git a/packages/go_router/pubspec.yaml b/packages/go_router/pubspec.yaml index 7247f2a3cdf..b0360ff6011 100644 --- a/packages/go_router/pubspec.yaml +++ b/packages/go_router/pubspec.yaml @@ -1,13 +1,13 @@ name: go_router description: A declarative router for Flutter based on Navigation 2 supporting deep linking, data-driven routes and more -version: 12.1.1 +version: 12.1.2 repository: https://github.com/flutter/packages/tree/main/packages/go_router issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22 environment: - sdk: ">=2.19.0 <4.0.0" - flutter: ">=3.7.0" + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" dependencies: collection: ^1.15.0