Skip to content

Commit 14ed53b

Browse files
[go_router] Fixes use of Iterable (#5421)
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.
1 parent 0e3f013 commit 14ed53b

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

packages/go_router/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 12.1.2
2+
3+
* Fixes an incorrect use of `extends` for Dart 3 compatibility.
4+
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
5+
16
## 12.1.1
27

38
- Retains query parameters during refresh and first redirect.
@@ -75,7 +80,7 @@
7580

7681
## 10.1.1
7782

78-
- Fixes mapping from `Page` to `RouteMatch`s.
83+
- Fixes mapping from `Page` to `RouteMatch`s.
7984
- Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
8085

8186
## 10.1.0

packages/go_router/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ version: 3.0.1
44
publish_to: none
55

66
environment:
7-
sdk: ">=2.19.0 <4.0.0"
8-
flutter: ">=3.7.0"
7+
sdk: ">=3.0.0 <4.0.0"
8+
flutter: ">=3.10.0"
99

1010
dependencies:
1111
adaptive_navigation: ^0.0.4

packages/go_router/lib/src/delegate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class GoRouterDelegate extends RouterDelegate<RouteMatchList>
247247
/// The iterator starts with the navigator that hosts the top-most route. This
248248
/// navigator may not be the inner-most navigator if the top-most route is a
249249
/// pageless route, such as a dialog or bottom sheet.
250-
class _NavigatorStateIterator extends Iterator<NavigatorState> {
250+
class _NavigatorStateIterator implements Iterator<NavigatorState> {
251251
_NavigatorStateIterator(this.matchList, this.root)
252252
: index = matchList.matches.length - 1;
253253

packages/go_router/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: go_router
22
description: A declarative router for Flutter based on Navigation 2 supporting
33
deep linking, data-driven routes and more
4-
version: 12.1.1
4+
version: 12.1.2
55
repository: https://github.com/flutter/packages/tree/main/packages/go_router
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22
77

88
environment:
9-
sdk: ">=2.19.0 <4.0.0"
10-
flutter: ">=3.7.0"
9+
sdk: ">=3.0.0 <4.0.0"
10+
flutter: ">=3.10.0"
1111

1212
dependencies:
1313
collection: ^1.15.0

0 commit comments

Comments
 (0)