Skip to content

Commit

Permalink
[url_launcher] Replace deprecated RouteInformation APIs (flutter#6127)
Browse files Browse the repository at this point in the history
Update for
https://docs.flutter.dev/release/breaking-changes/route-information-uri and makes 3.13 the minimum supported version accordingly.

Fixes flutter#124045
  • Loading branch information
stuartmorgan authored Feb 15, 2024
1 parent 4035b62 commit ef349be
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.2

* Replaces deprecated RouteInformation API usage.

## 2.3.1

* Updates minimum required plugin_platform_interface version to 2.1.7.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ abstract class LinkInfo {
// TODO(ianh): Remove the first argument.
Future<ByteData> pushRouteNameToFramework(Object? _, String routeName) {
final Completer<ByteData> completer = Completer<ByteData>();
SystemNavigator.routeInformationUpdated(location: routeName);
SystemNavigator.routeInformationUpdated(uri: Uri.parse(routeName));
ui.channelBuffers.push(
'flutter/navigation',
_codec.encodeMethodCall(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.3.1
version: 2.3.2

environment:
sdk: ">=3.0.0 <4.0.0"
flutter: ">=3.10.0"
sdk: ^3.1.0
flutter: ">=3.13.0"

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class _RouteDelegate extends RouterDelegate<RouteInformation>
if (_history.isEmpty) {
return const Placeholder(key: Key('empty'));
}
// ignore: unnecessary_string_interpolations
return Placeholder(key: Key('${_history.last.location}'));
return Placeholder(key: Key(_history.last.uri.path));
}
}

0 comments on commit ef349be

Please sign in to comment.