Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 8caf5dc

Browse files
committed
Update path-provider plug-in
Address documentation issues, and update to a more appropriate exception related to the external storage directory functionality.
1 parent b30817e commit 8caf5dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/path-provider/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## [0.2.1] - 2017-05-11
22

3-
* Add function to determine external storage directory
3+
* Add function to determine external storage directory.
44

55
## [0.2.0] - 2017-05-10
66

packages/path-provider/lib/path_provider.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ const _channel = const MethodChannel('plugins.flutter.io/path_provider');
4545
/// The current operating system should be determined before issuing this
4646
/// function call, as this functionality is only available on Android.
4747
///
48-
/// On iOS, this function throws an UnimplementedError as it is not possible
48+
/// On iOS, this function throws an UnsupportedError as it is not possible
4949
/// to access outside the app's sandbox.
5050
///
5151
/// On Android this returns getExternalStorageDirectory.
5252
Future<Directory> getExternalStorageDirectory() async {
53-
if (Platform.operatingSystem == "ios")
54-
throw new UnimplementedError("Functionality not available on iOS");
53+
if (Platform.isIOS)
54+
throw new UnsupportedError("Functionality not available on iOS");
5555
final String path = await _channel.invokeMethod('getStorageDirectory');
5656
if (path == null)
5757
return null;

0 commit comments

Comments
 (0)