A Flutter plugin for finding commonly used locations on the filesystem. Supports iOS and Android.
To use this plugin, add
path_provider as a dependency in your pubspec.yaml file.
Directory tempDir = await getTemporaryDirectory(); String tempPath = tempDir.path; Directory appDocDir = await getApplicationDocumentsDirectory(); String appDocPath = appDocDir.path;
Please see the example app of this plugin for a full example.
- Support retrieving storage paths on Android devices with multiple external
storage options. This adds a new class
AndroidEnvironmentthat shadows the directory names from Androids
getLibraryDirectorysemantics & tests.
- Define clang module for iOS.
- Added iOS-only support for
- Update integration tests and example test.
- Update example app UI to use a
ListViewshow the list of content.
- Update .gitignore to include Xcode build output folder
- Correct the integration test for Android's
setMockPathProviderPlatformfor API for tests.
- Adds missing unit and integration tests.
- Fix fall through bug.
- On Android,
getApplicationSupportDirectoryis now supported using
nullinstead of throwing an exception if no external files directory is available.
- Cast error codes as longs in iOS error strings to ensure compatibility between arm32 and arm64.
- Updated documentation for
getApplicationDocumentsDirectoryto suggest using
getApplicationSupportDirectoryon iOS and
- Updated documentation for
getTemporaryDirectoryto suggest using it for caches of files that do not need to be backed up.
- Updated integration tests and example to reflect the above changes.
- Added integration tests.
- Log a more detailed warning at build time about the previous AndroidX migration.
- Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.
- Updated Gradle tooling to match Android Studio 3.1.2.
- Breaking change. Set SDK constraints to match the Flutter beta release.
- Simplified and upgraded Android project template to Android SDK 27.
- Updated package description.
- Breaking change. Upgraded to Gradle 4.1 and Android Studio Gradle plugin 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in order to use this version of the plugin. Instructions can be found here.
- Add FLT prefix to iOS types
- Updated README
- Add function to determine external storage directory.
- Upgrade to new plugin registration. (https://groups.google.com/forum/#!topic/flutter-dev/zba1Ynf2OKM)
- Upgrade Android SDK Build Tools to 25.0.3.
- Add test.
- Change to README.md.
- Initial Open Source release.
Demonstrates how to use the path_provider plugin.
Getting Started #
For help getting started with Flutter, view our online documentation.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: path_provider: ^1.4.0
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Nov 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.0
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.6
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
|Dart SDK||>=2.0.0-dev.28.0 <3.0.0|