Viewing version 4.4.1. Open the latest package page.

permission_handler_platform_interface

4.4.1

A common platform interface for the permission_handler plugin.

Download archive

Readme

permission_handler_platform_interface

pub package Build status style: effective dartcodecov

A common platform interface for the permission_handler plugin.

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.

Usage

To implement a new platform-specific implementation of permission_handler, extend PermissionHandlerPlatform with an implementation that performs the platform-specific behavior, and when you register your plugin, set the default PermissionHandlerPlatform by calling PermissionHandlerPlatform.instance = MyPlatformPermissionHandler().

Issues

Please file any issues, bugs, or feature requests 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.

Author

This Permission handler plugin for Flutter is developed by Baseflow. You can contact us at hello@baseflow.com

Changelog

4.4.1

  • Documents that on Android PermissionStatus.permanentlyDenied is only returned as the result of a request, never by a status check.

4.4.0

  • Adds support for the new Android 17 permission ACCESS_LOCAL_NETWORK

4.3.0

  • Updates project dependencies.

4.2.3

  • Fixes class name references in the API documentation.

4.2.2

  • Adds limited access permission for Android 14+.

4.2.1

  • Resolves an error that occurred when calling the shouldShowRequestPermissionRationale on iOS.

4.2.0

  • Adds a new permission Permission.backgroundRefresh to check the background refresh permission status on iOS & macOS platforms. This is a no-op on all other platforms.

4.1.0

  • Adds the Permission.assistant which allows users to request permissions to access SiriKit on iOS and macOS platforms. This is a no-op on all other platforms.

4.0.2

  • Improved the documentation around the PermissionStatus, PermissionStatusGetters and FuturePermissionStatusGetters.

4.0.1

  • Updates Android documentation on how to use permission.photo on Android 12 (API 32) and below and Android 13 (API 33) and above.

4.0.0

  • BREAKING CHANGE: Replaces Permission.calendarReadOnly with Permission.calendarWriteOnly.

3.12.0

  • Adds Permission.calendarReadOnly and Permission.calendarFullAccess.
  • Deprecates Permission.calendar. Developers should use Permission.calendarReadOnly and Permission.calendarFullAccess instead.

3.11.5

  • Updates the mentions of Android versions throughout the plugin, now following a format of 'Android {name} (API {number})'. For example: 'Android 13 (API 33)'.

3.11.4

  • Clarifies the documentation on requesting background location permission through Permission.locationAlways on Android 10+ (API 29+).

3.11.3

  • Updates the documentation for the Permission.bluetooth permission regarding the limitations of the permission on iOS.

3.11.2

  • Changes Permission.bluetooth into an instance of PermissionWithService instead of Permission in order to determine iOS native's CBManagerStatePoweredOn.

3.11.1

  • Updates the documentation for the Permission.storage permission regarding its use on Android.

3.11.0+1

  • HOTFIX: Fixes misalignment in the Permission enum after adding the new BODY_SENSORS_BACKGROUND permission.

3.11.0

  • Adds support for the new Android 13 permission: BODY_SENSORS_BACKGROUND.

3.10.0

  • Adds support for the "Provisional" permission status introduced with iOS 12+.

3.9.0

  • Adds support for the new Android 13 permissions: SCHEDULE_EXACT_ALARM, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO and READ_MEDIA_AUDIO

3.8.0

  • Adds support for the new Android 13 permission: NEARBY_WIFI_DEVICES.

3.7.1

  • Updates the documentation on permissions in permission_status.dart

3.7.0

  • Adds support for the new Android 12 Bluetooth permissions: BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE, and BLUETOOTH_CONNECT.

3.6.2

  • Updates the MethodChannelMock due to breaking changes in the platform channel test interface.

3.6.1

  • Updates the meta dependency to version ^1.3.0.
  • Updates documentation for the locationAlways permission

3.6.0

  • Adds support for iOS Critical Alerts and Android Access Notification Policy.

3.5.1

  • Updates API documentation for the PermissionStatus.permanentlyDenied status.

3.5.0

  • Adds support for app tracking transparency permission.

3.4.0

  • Adds support request install packages permission.

3.3.0

  • Adds support for system alert window permission.

3.2.0

  • Adds support for managing external storage permission available on Android 10 and up.

3.1.3

  • Implements the equality operator for the Permission class;
  • Reverts the status of the services check for notification permission. Turns out the implementation does not fit with the ideas of the permission_handler plugin.

3.1.2

  • Allows checking service status for notification permission.

3.1.1

  • Fixes conversion issue where PermissionStatus.denied was not translated to the correct index.
  • Adds unit tests to guard API against breaking changes.

3.1.0

  • Adds support for Bluetooth permissions.

3.0.0+1

  • BREAKING: Removes the PermissionStatus.undetermined. This is now replaced by PermissionStatus.denied.

3.0.0

  • Migrates to null safety.

2.0.2

  • Adds support for the limited photo permission available on iOS 14 and up.

2.0.1

  • Updates to platform_interface 1.0.2
  • Fixes bug that allows requesting if the device has phone capabilities.

2.0.0

  • BREAKING: Creates a much more intuitive API using Dart's new extension methods (#230). Big thank you to @marcelgarus for the idea and for doing all the grunt work.

1.0.0

  • Initial open-source release.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'permission_handler_platform_interface:4.4.1'
pubspec.yaml
name: permission_handler_platform_interface
description: A common platform interface for the permission_handler plugin.
homepage: https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_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: 4.4.1

environment:
  sdk: ^3.6.0
  flutter: ">=3.24.0"
resolution: workspace

dependencies:
  flutter:
    sdk: flutter
  meta: ^1.3.0
  plugin_platform_interface: ^2.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  mockito: ^5.4.5
  flutter_lints: ^5.0.0

Version history

VersionPublishedArchiveSHA-256
1.0.0On demandDownload3475a0dc…c58fbf
2.0.0On demandDownload8a0e43a3…0907ca
2.0.1On demandDownloadc49b8fce…62cf94
2.0.2On demandDownloadf7e3c798…d518ba
3.0.0On demandDownloada88ae953…b5f03b
3.0.0+1On demandDownload34bbf0eb…61a993
3.1.0On demandDownload74347a96…fc8f92
3.1.1On demandDownload5b21d7d2…366469
3.1.2On demandDownload0a615e16…b82ac8
3.1.3On demandDownload783a43fc…91dff1
3.2.0On demandDownloadb5ac2ce5…80a7fa
3.3.0On demandDownloada5c66193…7dc653
3.4.0On demandDownload305e01cc…566fa1
3.5.0On demandDownloaddba4e4b2…a198e7
3.5.1On demandDownload4b26dbb5…c620ce
3.6.0On demandDownload1b4ec039…c1db32
3.6.1On demandDownloadeb03a0c3…9a27d5
3.6.2On demandDownload8b6e53e9…2a51e8
3.7.0On demandDownloadca16451b…d7d21f
3.7.1On demandDownload5a053647…fd0077
3.8.0On demandDownloada1cc40f8…1111fb
3.9.0On demandDownload68abbc47…97eb84
3.10.0On demandDownloadde20a5c3…6e6b11
3.11.0On demandDownload0bcae4a6…b566ce
3.11.0+1On demandDownload79b36d93…46fe7e
3.11.1On demandDownload463a07cb…456993
3.11.2On demandDownloada9b692bf…2328a4
3.11.3On demandDownload7c6b1500…7c02a9
3.11.4On demandDownload5d24686d…1ee788
3.11.5On demandDownloadf2343e9f…67b4b2
3.12.0On demandDownload6760eb5e…55c4a4
4.0.0On demandDownload879dc7dc…d89c13
4.0.1On demandDownloadb0ab5d5b…a68614
4.0.2On demandDownloadd8734931…ffe1a1
4.1.0On demandDownload5c43148f…a43c3c
4.2.0On demandDownload23dfba84…800b78
4.2.1On demandDownload48d4fcf2…b9fd20
4.2.2On demandDownloadfe0ffe27…9358ea
4.2.3On demandDownloade9c8eade…f4b4f9
4.3.0On demandDownloadeb99b295…282878
4.4.0On demandDownloada5c8a97e…760b23
4.4.1Cached · Upstream SHA-256 matchedDownloaded86a61c…28a531

Dependencies

flutter { "sdk": "flutter" }

meta "^1.3.0"

plugin_platform_interface "^2.0.0"