getAuthorizationState method
Implementation
@override
Future<int> getAuthorizationState() async {
try {
final state =
await methodChannel.invokeMethod<int>('getAuthorizationState') ?? 0;
return state;
} on PlatformException catch (e) {
if (e.code == 'UNSUPPORTED_VERSION') {
throw PlatformException(
code: 'UNSUPPORTED_VERSION',
message: 'AlarmKit is only available on iOS 26.0 and above',
);
}
rethrow;
}
}