From 2bd52af77fb05209b467d172ba2d80a320af315b Mon Sep 17 00:00:00 2001 From: Amir Hardon Date: Fri, 13 Dec 2019 11:23:47 -0800 Subject: [PATCH] [url_launcher_platform_interface] use non static token for platform interface --- .../url_launcher/url_launcher_platform_interface/CHANGELOG.md | 4 ++++ .../lib/url_launcher_platform_interface.dart | 2 +- .../url_launcher/url_launcher_platform_interface/pubspec.yaml | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/url_launcher/url_launcher_platform_interface/CHANGELOG.md b/packages/url_launcher/url_launcher_platform_interface/CHANGELOG.md index fa13c2d258e7..f55b4cbf346a 100644 --- a/packages/url_launcher/url_launcher_platform_interface/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.5 + +* Make the `PlatformInterface` `_token` non `const` (as `const` `Object`s are not unique). + ## 1.0.4 * Use the common PlatformInterface code from plugin_platform_interface. diff --git a/packages/url_launcher/url_launcher_platform_interface/lib/url_launcher_platform_interface.dart b/packages/url_launcher/url_launcher_platform_interface/lib/url_launcher_platform_interface.dart index 3e41df051dc9..164555d63e0c 100644 --- a/packages/url_launcher/url_launcher_platform_interface/lib/url_launcher_platform_interface.dart +++ b/packages/url_launcher/url_launcher_platform_interface/lib/url_launcher_platform_interface.dart @@ -20,7 +20,7 @@ abstract class UrlLauncherPlatform extends PlatformInterface { /// Constructs a UrlLauncherPlatform. UrlLauncherPlatform() : super(token: _token); - static const Object _token = Object(); + static final Object _token = Object(); static UrlLauncherPlatform _instance = MethodChannelUrlLauncher(); diff --git a/packages/url_launcher/url_launcher_platform_interface/pubspec.yaml b/packages/url_launcher/url_launcher_platform_interface/pubspec.yaml index e8cab0e67f00..aa57b142b3f3 100644 --- a/packages/url_launcher/url_launcher_platform_interface/pubspec.yaml +++ b/packages/url_launcher/url_launcher_platform_interface/pubspec.yaml @@ -3,13 +3,13 @@ description: A common platform interface for the url_launcher plugin. homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_platform_interface # 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: 1.0.4 +version: 1.0.5 dependencies: flutter: sdk: flutter meta: ^1.0.5 - plugin_platform_interface: ^1.0.0 + plugin_platform_interface: ^1.0.1 dev_dependencies: flutter_test: