requestScheduleExactAlarm method

  1. @override
Future<void> requestScheduleExactAlarm()
override

Requests permission for schedule exact alarm on Android. This is typically used on Android to allow the app to schedule exact alarms.

Implementation

@override
Future<void> requestScheduleExactAlarm() async {
  if (Platform.isAndroid) {
    try {
      await methodChannel.invokeMethod<String>('requestScheduleExactAlarm');
    } on PlatformException catch (e) {
      log("Error requestScheduleExactAlarm: ${e.message}");
      rethrow;
    }
  }
}