Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
37be48c
- Adds `GoRouter.goRelative`
ThangVuNguyenViet May 29, 2024
f8061ce
add go_relative example for go_router
ThangVuNguyenViet May 29, 2024
8a77147
add go_relative_test for the example
ThangVuNguyenViet May 29, 2024
61127f3
fix failed test
ThangVuNguyenViet May 29, 2024
687b332
replace goRelative with go('./$path')
ThangVuNguyenViet Jun 19, 2024
cca1454
Commit missing files during merge
ThangVuNguyenViet Jun 19, 2024
975128b
update changelog & version
ThangVuNguyenViet Jun 19, 2024
6d90488
Prevent concatenateUris from adding trailing redundant '?'. Add test …
ThangVuNguyenViet Jun 19, 2024
ccb38f9
Add more `concatenateUris` test. Fix joining params
ThangVuNguyenViet Jun 19, 2024
80d85d6
update example description
ThangVuNguyenViet Jul 10, 2024
a09aa94
Make concatenateUris not merging parameters, only take them from chil…
ThangVuNguyenViet Jul 19, 2024
a174cbe
Add GoRelativeRouteConfig
ThangVuNguyenViet Jul 10, 2024
4cb0334
Add test, examples and example tests for go_router_builder. Temporari…
ThangVuNguyenViet Jul 19, 2024
ceaa318
Add relativeLocation, push, pushReplacement & replace to the Relative…
ThangVuNguyenViet Jul 19, 2024
d3b5355
Merge branch 'flutter-main'
ThangVuNguyenViet Jan 22, 2025
07b4a23
update go_router package dependency
ThangVuNguyenViet Jan 22, 2025
6008b8b
Fix merge issues
ThangVuNguyenViet Jan 22, 2025
d2fbc0e
temporarily add dependency_override
ThangVuNguyenViet Jan 22, 2025
8b5fb4d
change relative route actions to have suffix `Relative`
ThangVuNguyenViet Feb 3, 2025
02c3d7b
Fix example
ThangVuNguyenViet Feb 4, 2025
72c06de
Update go_relative test
ThangVuNguyenViet Feb 6, 2025
edef7a5
Merge branch 'main' of github.com:flutter/packages
ThangVuNguyenViet May 17, 2025
5474303
fix generated file
ThangVuNguyenViet May 17, 2025
dbf7f9d
Fix failed test due to generated files
ThangVuNguyenViet May 17, 2025
37c5490
Merge branch 'main' of github.com:flutter/packages
ThangVuNguyenViet Jun 2, 2025
868a2d5
Merge branch 'main' of github.com:flutter/packages
ThangVuNguyenViet Jun 12, 2025
232dc7d
Merge branch 'main' of github.com:flutter/packages
ThangVuNguyenViet Jul 1, 2025
1d5ad11
Merge branch 'main' of github.com:flutter/packages
ThangVuNguyenViet Jul 9, 2025
f899939
Remove GoRouteData routing methods. Update TypedRelativeGoRoute gener…
ThangVuNguyenViet Jul 9, 2025
92f6cac
remove overrides on other tests
ThangVuNguyenViet Jul 9, 2025
f98505e
make sure relative go route generated code resembles typed go route a…
ThangVuNguyenViet Jul 9, 2025
20fd5d6
update changelog
ThangVuNguyenViet Jul 10, 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
Prev Previous commit
Next Next commit
Merge branch 'flutter-main'
  • Loading branch information
ThangVuNguyenViet committed Jan 22, 2025
commit d3b53559570efffc3112a8128737b91d06692ded
78 changes: 76 additions & 2 deletions packages/go_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,81 @@
## 14.2.1
- Allows going to a path relatively by prefixing `./`
## 14.6.5
- Adds `TypedRelativeGoRoute`

## 14.6.4

- Rephrases readme.

## 14.6.3

- Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
- Updates readme.

## 14.6.2

- Replaces deprecated collection method usage.

## 14.6.1

- Fixed `PopScope`, and `WillPopScop` was not handled properly in the Root routes.

## 14.6.0

- Allows going to a path relatively by prefixing `./`

## 14.5.0

- Adds preload support to StatefulShellRoute, configurable via `preload` parameter on StatefulShellBranch.


## 14.4.1

- Adds `missing_code_block_language_in_doc_comment` lint.

## 14.4.0

- Adds current state getter on `GoRouter` that returns the current `GoRouterState`.

## 14.3.0

- Adds missing implementation for the routerNeglect parameter in GoRouter.

## 14.2.9

- Relaxes route path requirements. Both root and child routes can now start with or without '/'.

## 14.2.8

- Updated custom_stateful_shell_route example to better support swiping in TabView as well as demonstration of the use of PageView.

## 14.2.7

- Fixes issue so that the parseRouteInformationWithContext can handle non-http Uris.

## 14.2.6

- Fixes replace and pushReplacement uri when only one route match in current route match list.

## 14.2.5

- Fixes an issue where android back button pops pages in the wrong order.

## 14.2.4

- Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
- Fix GoRouter configuration in `upgrading.md`

## 14.2.3

- Fixes redirect example's signature in `route.dart`.

## 14.2.2

- Adds section for "Stateful nested navigation" to configuration.md.

## 14.2.1

- Makes GoRouterState lookup more robust.

## 14.2.0

- Added proper `redirect` handling for `ShellRoute.$route` and `StatefulShellRoute.$route` for proper redirection handling in case of code generation.
Expand Down
70 changes: 39 additions & 31 deletions packages/go_router/example/lib/go_relative.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ import 'package:go_router/go_router.dart';
/// This sample app demonstrates how to use go relatively with GoRouter.go('./$path').
void main() => runApp(const MyApp());

/// The main app.
class MyApp extends StatelessWidget {
/// Constructs a [MyApp]
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp.router(
routerConfig: _router,
);
}
}

/// The route configuration.
final GoRouter _router = GoRouter(
routes: <RouteBase>[
Expand Down Expand Up @@ -36,19 +49,6 @@ final GoRouter _router = GoRouter(
],
);

/// The main app.
class MyApp extends StatelessWidget {
/// Constructs a [MyApp]
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp.router(
routerConfig: _router,
);
}
}

/// The home screen
class HomeScreen extends StatelessWidget {
/// Constructs a [HomeScreen]
Expand Down Expand Up @@ -83,22 +83,23 @@ class DetailsScreen extends StatelessWidget {
return Scaffold(
appBar: AppBar(title: const Text('Details Screen')),
body: Center(
child: Column(
children: <Widget>[
TextButton(
onPressed: () {
context.pop();
},
child: const Text('go back'),
),
TextButton(
onPressed: () {
context.go('./settings');
},
child: const Text('Go to the Settings screen'),
),
],
)),
child: Column(
children: <Widget>[
TextButton(
onPressed: () {
context.pop();
},
child: const Text('Go back'),
),
TextButton(
onPressed: () {
context.go('./settings');
},
child: const Text('Go to the Settings screen'),
),
],
),
),
);
}
}
Expand All @@ -112,8 +113,15 @@ class SettingsScreen extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Settings Screen')),
body: const Center(
child: Text('Settings'),
body: Column(
children: <Widget>[
TextButton(
onPressed: () {
context.pop();
},
child: const Text('Go back'),
),
],
),
);
}
Expand Down
8 changes: 8 additions & 0 deletions packages/go_router/example/test/go_relative_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,13 @@ void main() {
await tester.tap(find.text('Go to the Settings screen'));
await tester.pumpAndSettle();
expect(find.byType(example.SettingsScreen), findsOneWidget);

await tester.tap(find.text('Go back'));
await tester.pumpAndSettle();
expect(find.byType(example.DetailsScreen), findsOneWidget);

await tester.tap(find.text('Go back'));
await tester.pumpAndSettle();
expect(find.byType(example.HomeScreen), findsOneWidget);
});
}
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: 14.2.1
version: 14.6.6
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
15 changes: 14 additions & 1 deletion packages/go_router_builder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
## 2.7.1
## 2.7.4

- Adds `TypedRelativeGoRoute` annotation which supports relative routes.

## 2.7.3

- Fixes an issue when using a not null List or Set param.

## 2.7.2

- Supports the latest `package:analyzer` and `package:source_gen`.
- Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.

## 2.7.1

- Fixes readme typos and uses code excerpts.

## 2.7.0

- Adds an example and a test with `onExit`.
Expand Down
2 changes: 1 addition & 1 deletion 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.8.0
version: 2.8.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 Down
You are viewing a condensed version of this merge commit. You can view the full changes here.