Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
63ef007
reproduce issue https://github.com/flutter/flutter/issues/150312
ahyangnb Dec 28, 2024
b92dc00
fix #150312
ahyangnb Dec 28, 2024
614663c
A new way to fix the #6953 issue.
ahyangnb Jan 9, 2025
ae86e7a
Unit test for issues/150312
ahyangnb Jan 22, 2025
15dd5b7
Merge branch 'main' into main
ahyangnb Jan 22, 2025
cad1f24
fix"info • example/test/test_stream_listener.dart:41:2 • Missing a ne…
ahyangnb Jan 22, 2025
6030676
license text used by all first-party files in this repository
ahyangnb Jan 22, 2025
545f133
Version 14.6.5: - Fix issue 150312.
ahyangnb Jan 22, 2025
9a53bdf
Merge branch 'main' into main
ahyangnb Jan 23, 2025
e208cca
Merge branch 'main' into main
ahyangnb Jan 24, 2025
99f7293
version 14.7.2: - Fix issue 150312.
ahyangnb Jan 24, 2025
653d58e
Merge branch 'main' into main
ahyangnb Jan 26, 2025
ec2be8d
Merge branch 'main' into main
ahyangnb Feb 3, 2025
0dae57a
14.7.3
ahyangnb Feb 3, 2025
8cc913b
Merge branch 'main' into main
ahyangnb Feb 4, 2025
00d392c
Merge branch 'main' into main
ahyangnb Feb 5, 2025
6ce16f8
Merge branch 'main' into main
ahyangnb Feb 6, 2025
31d8ddb
Merge branch 'main' into main
ahyangnb Feb 8, 2025
2345943
Merge branch 'main' into main
ahyangnb Feb 13, 2025
67ed112
test: restore() update currentConfiguration in pop()
ahyangnb Feb 14, 2025
3a02f82
Merge branch 'main' into main
ahyangnb Feb 14, 2025
de10e04
Merge branch 'main' into main
ahyangnb Feb 15, 2025
ec4e34f
Merge branch 'main' into main
ahyangnb Feb 18, 2025
b63a7d9
Merge branch 'main' into main
ahyangnb Feb 20, 2025
9440747
Merge branch 'main' into main
ahyangnb Feb 21, 2025
846fcfb
Merge branch 'main' into main
ahyangnb Feb 24, 2025
dda78e0
Merge branch 'main' into main
ahyangnb Mar 1, 2025
8c1e543
Merge branch 'main' into main
ahyangnb May 9, 2025
6fbb0e0
Merge branch 'flutter:main' into main
ahyangnb Jun 9, 2025
93ee871
* add change logs: Fixes Popping state and re-rendering scaffold at t…
ahyangnb Jun 9, 2025
96320b2
* remove: stream_listener_router.dart and test_stream_listener.dart
ahyangnb Jun 9, 2025
dd6dae6
## 15.1.4
ahyangnb Jun 10, 2025
137c5e3
Update version to 15.1.4 in pubspec.yaml
ahyangnb Jun 10, 2025
fe1bfae
Merge branch 'main' into main
ahyangnb Jun 11, 2025
c6cd8d4
Merge branch 'main' into main
Piinks Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/go_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 15.2.1

* Fixes Popping state and re-rendering scaffold at the same time doesn't update the URL on web.

## 15.2.0

- `GoRouteData` now defines `.location`, `.go(context)`, `.push(context)`, `.pushReplacement(context)`, and `replace(context)` to be used for [Type-safe routing](https://pub.dev/documentation/go_router/latest/topics/Type-safe%20routes-topic.html). **Requires go_router_builder >= 3.0.0**.
* `GoRouteData` now defines `.location`, `.go(context)`, `.push(context)`, `.pushReplacement(context)`, and `replace(context)` to be used for [Type-safe routing](https://pub.dev/documentation/go_router/latest/topics/Type-safe%20routes-topic.html). **Requires go_router_builder >= 3.0.0**.

## 15.1.3

Expand Down
4 changes: 4 additions & 0 deletions packages/go_router/lib/src/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,16 @@ class GoRouter implements RouterConfig<RouteMatchList> {
///
/// If the top-most route is a pop up or dialog, this method pops it instead
/// of any GoRoute under it.
///
/// Ensure that the `value` of `routeInformationProvider` is synced
/// with `routerDelegate.currentConfiguration`.
void pop<T extends Object?>([T? result]) {
assert(() {
log('popping ${routerDelegate.currentConfiguration.uri}');
return true;
}());
routerDelegate.pop<T>(result);
restore(routerDelegate.currentConfiguration);
}

/// Refresh the route.
Expand Down
2 changes: 1 addition & 1 deletion packages/go_router/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: go_router
description: A declarative router for Flutter based on Navigation 2 supporting
deep linking, data-driven routes and more
version: 15.2.0
version: 15.2.1
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

Expand Down
22 changes: 22 additions & 0 deletions packages/go_router/test/delegate_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@ Future<GoRouter> createGoRouterWithStatefulShellRoute(

void main() {
group('pop', () {
testWidgets('restore() update currentConfiguration in pop()',
(WidgetTester tester) async {
final ValueNotifier<int> valueNotifier = ValueNotifier<int>(0);
final GoRouter goRouter = await createGoRouter(tester,
refreshListenable: valueNotifier, dispose: false);

goRouter.push('/a');
await tester.pumpAndSettle();

goRouter.pop();
valueNotifier.notifyListeners();
await tester.pumpAndSettle();
expect(
goRouter
.routerDelegate.currentConfiguration.matches.last.matchedLocation,
'/',
);

addTearDown(valueNotifier.dispose);
addTearDown(goRouter.dispose);
});

testWidgets('removes the last element', (WidgetTester tester) async {
final GoRouter goRouter = await createGoRouter(tester)
..push('/error');
Expand Down