Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 9 commits into from
Jan 17, 2024
4 changes: 4 additions & 0 deletions permission_handler_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ class Permission {
/// Permission for reading from and writing to the device's calendar.
static const calendarFullAccess = Permission._(37);

/// Android: Nothing
/// iOS: SiriKit
static const assistant = Permission._(38);

/// Returns a list of all possible [PermissionGroup] values.
static const List<Permission> values = <Permission>[
// ignore: deprecated_member_use_from_same_package
Expand Down Expand Up @@ -360,6 +364,7 @@ class Permission {
sensorsAlways,
calendarWriteOnly,
calendarFullAccess,
assistant,
];

static const List<String> _names = <String>[
Expand Down Expand Up @@ -401,6 +406,7 @@ class Permission {
'sensorsAlways',
'calendarWriteOnly',
'calendarFullAccess',
'assistant',
];

@override
Expand Down
2 changes: 1 addition & 1 deletion permission_handler_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
# 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.0.2
version: 4.1.0

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ void main() {
() {
const values = Permission.values;

expect(values.length, 38);
expect(values.length, 39);
});

test('check if byValue returns corresponding PermissionGroup value', () {
Expand Down
Loading