Skip to content

Commit 1984e0a

Browse files
authored
[go_router] Removes urlPathStrategy completely (#2684)
1 parent 66674dc commit 1984e0a

File tree

8 files changed

+5
-54
lines changed

8 files changed

+5
-54
lines changed

packages/go_router/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 5.1.0
2+
3+
- Removes urlPathStrategy completely, which should have been done in v5.0.0 but some code remained mistakenly.
4+
15
## 5.0.5
26

37
- Fixes issue where asserts in popRoute were preventing the app from

packages/go_router/lib/go_router.dart

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export 'src/configuration.dart'
1111
export 'src/misc/extensions.dart';
1212
export 'src/misc/inherited_router.dart';
1313
export 'src/pages/custom_transition_page.dart';
14-
export 'src/platform.dart' show UrlPathStrategy;
1514
export 'src/route_data.dart' show GoRouteData, TypedGoRoute;
1615
export 'src/router.dart';
1716
export 'src/typedefs.dart' show GoRouterPageBuilder, GoRouterRedirect;

packages/go_router/lib/src/platform.dart

-8
This file was deleted.

packages/go_router/lib/src/platform/path_strategy_nonweb.dart

-11
This file was deleted.

packages/go_router/lib/src/platform/path_strategy_web.dart

-16
This file was deleted.

packages/go_router/lib/src/platform/url_path_strategy.dart

-12
This file was deleted.

packages/go_router/lib/src/router.dart

-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import 'logging.dart';
1111
import 'matching.dart';
1212
import 'misc/inherited_router.dart';
1313
import 'parser.dart';
14-
import 'platform.dart';
1514
import 'typedefs.dart';
1615

1716
/// The top-level go router class.
@@ -269,10 +268,6 @@ class GoRouter extends ChangeNotifier
269268
_routeInformationProvider.notifyListeners();
270269
}
271270

272-
/// Set the app's URL path strategy (defaults to hash). call before runApp().
273-
static void setUrlPathStrategy(UrlPathStrategy strategy) =>
274-
setUrlPathStrategyImpl(strategy);
275-
276271
/// Find the current GoRouter in the widget tree.
277272
static GoRouter of(BuildContext context) {
278273
final InheritedGoRouter? inherited =

packages/go_router/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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: 5.0.5
4+
version: 5.1.0
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

0 commit comments

Comments
 (0)