Commit 0bf4d6f0 by Maurits van Beusekom Committed by GitHub

Adds support to request SiriKit permissions to platform interface. (#1266)

* Adding SiriKit permissions (#1140)

* Adding SiriKit permissions

* Fix tests

---------

Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl>

* Reserves the assistant permission on no-op platforms

* Adds support to example application

* Remove pubspec overrides

* Fix formatting

* Revert to platforms to main

* Revert so only platform interface changes are included

* Update permission_handler_platform_interface/CHANGELOG.md

Co-authored-by: TimHoogstrate <tim566@hotmail.com>

---------

Co-authored-by: Baptiste DUPUCH <baptiste.dupuch@gmail.com>
Co-authored-by: TimHoogstrate <tim566@hotmail.com>
parent bb8e40a6
## 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 ## 4.0.2
* Improved the documentation around the `PermissionStatus`, `PermissionStatusGetters` and `FuturePermissionStatusGetters`. * Improved the documentation around the `PermissionStatus`, `PermissionStatusGetters` and `FuturePermissionStatusGetters`.
......
...@@ -319,6 +319,10 @@ class Permission { ...@@ -319,6 +319,10 @@ class Permission {
/// Permission for reading from and writing to the device's calendar. /// Permission for reading from and writing to the device's calendar.
static const calendarFullAccess = Permission._(37); static const calendarFullAccess = Permission._(37);
/// Android: Nothing
/// iOS: SiriKit
static const assistant = Permission._(38);
/// Returns a list of all possible [PermissionGroup] values. /// Returns a list of all possible [PermissionGroup] values.
static const List<Permission> values = <Permission>[ static const List<Permission> values = <Permission>[
// ignore: deprecated_member_use_from_same_package // ignore: deprecated_member_use_from_same_package
...@@ -360,6 +364,7 @@ class Permission { ...@@ -360,6 +364,7 @@ class Permission {
sensorsAlways, sensorsAlways,
calendarWriteOnly, calendarWriteOnly,
calendarFullAccess, calendarFullAccess,
assistant,
]; ];
static const List<String> _names = <String>[ static const List<String> _names = <String>[
...@@ -401,6 +406,7 @@ class Permission { ...@@ -401,6 +406,7 @@ class Permission {
'sensorsAlways', 'sensorsAlways',
'calendarWriteOnly', 'calendarWriteOnly',
'calendarFullAccess', 'calendarFullAccess',
'assistant',
]; ];
@override @override
......
...@@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin. ...@@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin.
homepage: https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface 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 # 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 # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 4.0.2 version: 4.1.0
dependencies: dependencies:
flutter: flutter:
......
...@@ -6,7 +6,7 @@ void main() { ...@@ -6,7 +6,7 @@ void main() {
() { () {
const values = Permission.values; const values = Permission.values;
expect(values.length, 38); expect(values.length, 39);
}); });
test('check if byValue returns corresponding PermissionGroup value', () { test('check if byValue returns corresponding PermissionGroup value', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment