[path_provider] Use a different Android channel name (#4912)
diff --git a/packages/path_provider/path_provider_android/CHANGELOG.md b/packages/path_provider/path_provider_android/CHANGELOG.md
index 1282ab6..7b04e90 100644
--- a/packages/path_provider/path_provider_android/CHANGELOG.md
+++ b/packages/path_provider/path_provider_android/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 2.0.12
+
+* Returns to using a different platform channel name, undoing the revert in
+ 2.0.11, but updates the minimum Flutter version to 2.8 to avoid the issue
+ that caused the revert.
+
## 2.0.11
* Temporarily reverts the platform channel name change from 2.0.10 in order to
diff --git a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java
index 3ff2416..278ff58 100644
--- a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java
+++ b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java
@@ -153,7 +153,7 @@
public PathProviderPlugin() {}
private void setup(BinaryMessenger messenger, Context context) {
- String channelName = "plugins.flutter.io/path_provider";
+ String channelName = "plugins.flutter.io/path_provider_android";
// TODO(gaaclarke): Remove reflection guard when https://github.com/flutter/engine/pull/29147
// becomes available on the stable branch.
try {
diff --git a/packages/path_provider/path_provider_android/lib/path_provider_android.dart b/packages/path_provider/path_provider_android/lib/path_provider_android.dart
index 281cc51..b0f3808 100644
--- a/packages/path_provider/path_provider_android/lib/path_provider_android.dart
+++ b/packages/path_provider/path_provider_android/lib/path_provider_android.dart
@@ -11,7 +11,7 @@
/// The method channel used to interact with the native platform.
@visibleForTesting
MethodChannel methodChannel =
- const MethodChannel('plugins.flutter.io/path_provider');
+ const MethodChannel('plugins.flutter.io/path_provider_android');
/// Registers this class as the default instance of [PathProviderPlatform].
static void registerWith() {
diff --git a/packages/path_provider/path_provider_android/pubspec.yaml b/packages/path_provider/path_provider_android/pubspec.yaml
index e259fdc..63b9330 100644
--- a/packages/path_provider/path_provider_android/pubspec.yaml
+++ b/packages/path_provider/path_provider_android/pubspec.yaml
@@ -2,11 +2,11 @@
description: Android implementation of the path_provider plugin.
repository: https://github.com/flutter/plugins/tree/main/packages/path_provider/path_provider_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22
-version: 2.0.11
+version: 2.0.12
environment:
sdk: ">=2.14.0 <3.0.0"
- flutter: ">=2.5.0"
+ flutter: ">=2.8.0"
flutter:
plugin:
@@ -29,5 +29,4 @@
sdk: flutter
integration_test:
sdk: flutter
- plugin_platform_interface: ^2.0.0
test: ^1.16.0
diff --git a/packages/path_provider/path_provider_android/test/path_provider_android_test.dart b/packages/path_provider/path_provider_android/test/path_provider_android_test.dart
index 2388059..d2f9682 100644
--- a/packages/path_provider/path_provider_android/test/path_provider_android_test.dart
+++ b/packages/path_provider/path_provider_android/test/path_provider_android_test.dart
@@ -52,14 +52,6 @@
log.clear();
});
- // TODO(stuartmorgan): Change this to a test that it uses a different name,
- // to avoid potential confusion, once the SDK is changed to 2.8+. See
- // https://github.com/flutter/plugins/pull/4617#discussion_r774673962
- test('channel name is compatible with shared method channel', () async {
- expect(
- pathProvider.methodChannel.name, 'plugins.flutter.io/path_provider');
- });
-
test('getTemporaryPath', () async {
final String? path = await pathProvider.getTemporaryPath();
expect(