Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.1

* Rename enum to StorageDirectory for backwards compatibility.

## 1.0.0

* Initial release.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ abstract class PathProviderPlatform extends PlatformInterface {
/// These paths typically reside on external storage like separate partitions
/// or SD cards. Phones may have multiple storage directories available.
Future<List<String>> getExternalStoragePaths({
/// Optional parameter. See [AndroidStorageDirectory] for more informations on
/// Optional parameter. See [StorageDirectory] for more informations on
/// how this type translates to Android storage directories.
AndroidStorageDirectory type,
StorageDirectory type,
}) {
throw UnimplementedError(
'getExternalStoragePaths() has not been implemented.');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Corresponds to constants defined in Androids `android.os.Environment` class.
///
/// https://developer.android.com/reference/android/os/Environment.html#fields_1
enum AndroidStorageDirectory {
enum StorageDirectory {
/// Contains audio files that should be treated as music.
///
/// See https://developer.android.com/reference/android/os/Environment.html#DIRECTORY_MUSIC.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class MethodChannelPathProvider extends PathProviderPlatform {
}

Future<List<String>> getExternalStoragePaths({
AndroidStorageDirectory type,
StorageDirectory type,
}) async {
if (!_platform.isAndroid) {
throw UnsupportedError('Functionality only available on Android');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A common platform interface for the path_provider plugin.
homepage: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider_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.0
version: 1.0.1

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ void main() {
}
});

for (AndroidStorageDirectory type
in AndroidStorageDirectory.values + <AndroidStorageDirectory>[null]) {
for (StorageDirectory type
in StorageDirectory.values + <StorageDirectory>[null]) {
test('getExternalStoragePaths (type: $type) android succeeds', () async {
final List<String> result =
await methodChannelPathProvider.getExternalStoragePaths(type: type);
Expand Down