[go_router] Removes urlPathStrategy completely (#2684)

diff --git a/packages/go_router/CHANGELOG.md b/packages/go_router/CHANGELOG.md
index efc578b..2549c4d 100644
--- a/packages/go_router/CHANGELOG.md
+++ b/packages/go_router/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 5.1.0
+
+- Removes urlPathStrategy completely, which should have been done in v5.0.0 but some code remained mistakenly.
+
 ## 5.0.5
 
 - Fixes issue where asserts in popRoute were preventing the app from
diff --git a/packages/go_router/lib/go_router.dart b/packages/go_router/lib/go_router.dart
index 1d9f9dd..09bfda9 100644
--- a/packages/go_router/lib/go_router.dart
+++ b/packages/go_router/lib/go_router.dart
@@ -11,7 +11,6 @@
 export 'src/misc/extensions.dart';
 export 'src/misc/inherited_router.dart';
 export 'src/pages/custom_transition_page.dart';
-export 'src/platform.dart' show UrlPathStrategy;
 export 'src/route_data.dart' show GoRouteData, TypedGoRoute;
 export 'src/router.dart';
 export 'src/typedefs.dart' show GoRouterPageBuilder, GoRouterRedirect;
diff --git a/packages/go_router/lib/src/platform.dart b/packages/go_router/lib/src/platform.dart
deleted file mode 100644
index db4c7b8..0000000
--- a/packages/go_router/lib/src/platform.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// TODO(johnpryan): Remove this API
-export 'platform/path_strategy_nonweb.dart'
-    if (dart.library.html) 'platform/path_strategy_web.dart';
-export 'platform/url_path_strategy.dart';
diff --git a/packages/go_router/lib/src/platform/path_strategy_nonweb.dart b/packages/go_router/lib/src/platform/path_strategy_nonweb.dart
deleted file mode 100644
index 8caf922..0000000
--- a/packages/go_router/lib/src/platform/path_strategy_nonweb.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'url_path_strategy.dart';
-
-/// no-op implementation of the URL path strategy for non-web target platforms.
-// TODO(johnpryan): Remove this API
-void setUrlPathStrategyImpl(UrlPathStrategy strategy) {
-  // no-op
-}
diff --git a/packages/go_router/lib/src/platform/path_strategy_web.dart b/packages/go_router/lib/src/platform/path_strategy_web.dart
deleted file mode 100644
index c4dc30b..0000000
--- a/packages/go_router/lib/src/platform/path_strategy_web.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// from https://flutter.dev/docs/development/ui/navigation/url-strategies
-import 'package:flutter_web_plugins/flutter_web_plugins.dart';
-
-import 'url_path_strategy.dart';
-
-/// Forwarding implementation of the URL path strategy for the web target
-/// platform.
-void setUrlPathStrategyImpl(UrlPathStrategy strategy) {
-  setUrlStrategy(strategy == UrlPathStrategy.path
-      ? PathUrlStrategy()
-      : const HashUrlStrategy());
-}
diff --git a/packages/go_router/lib/src/platform/url_path_strategy.dart b/packages/go_router/lib/src/platform/url_path_strategy.dart
deleted file mode 100644
index 92a12f0..0000000
--- a/packages/go_router/lib/src/platform/url_path_strategy.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 The Flutter Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/// The path strategy for use in GoRouter.setUrlPathStrategy.
-enum UrlPathStrategy {
-  /// Use hash url strategy.
-  hash,
-
-  /// Use path url strategy.
-  path,
-}
diff --git a/packages/go_router/lib/src/router.dart b/packages/go_router/lib/src/router.dart
index b52cc22..69ecf41 100644
--- a/packages/go_router/lib/src/router.dart
+++ b/packages/go_router/lib/src/router.dart
@@ -11,7 +11,6 @@
 import 'matching.dart';
 import 'misc/inherited_router.dart';
 import 'parser.dart';
-import 'platform.dart';
 import 'typedefs.dart';
 
 /// The top-level go router class.
@@ -269,10 +268,6 @@
     _routeInformationProvider.notifyListeners();
   }
 
-  /// Set the app's URL path strategy (defaults to hash). call before runApp().
-  static void setUrlPathStrategy(UrlPathStrategy strategy) =>
-      setUrlPathStrategyImpl(strategy);
-
   /// Find the current GoRouter in the widget tree.
   static GoRouter of(BuildContext context) {
     final InheritedGoRouter? inherited =
diff --git a/packages/go_router/pubspec.yaml b/packages/go_router/pubspec.yaml
index 4281baf..e0a7c08 100644
--- a/packages/go_router/pubspec.yaml
+++ b/packages/go_router/pubspec.yaml
@@ -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: 5.0.5
+version: 5.1.0
 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