A common platform interface for the
This interface allows platform-specific implementations of the
permission_handler plugin, as well as the plugin itself, to ensure they are
supporting the same interface.
To implement a new platform-specific implementation of
PermissionHandlerPlatform with an implementation that performs
the platform-specific behavior, and when you register your plugin, set the
PermissionHandlerPlatform by calling
PermissionHandlerPlatform.instance = MyPlatformPermissionHandler().
Please file any issues, bugs or feature request as an issue on our GitHub page.
Want to contribute #
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.
Note on breaking changes #
Strongly prefer non-breaking changes (such as adding a method to the interface) over breaking changes for this package.
See https://flutter.dev/go/platform-interface-breaking-changes for a discussion on why a less-clean interface is preferable to a breaking change.
- BREAKING: Created a much more intuitive API using Dart's new extension methods (#230). Big thank you to @marcelgarus for the idea and doing all the grunt work.
- Initial open-source release.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: permission_handler_platform_interface: ^2.0.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 May 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.8.1
- pana: 0.13.8-dev
- Flutter: 1.17.0
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
permission_handler_platform_interface.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
|Dart SDK||>=2.6.0 <3.0.0|