requestNotificationPermissions static method

Future<bool> requestNotificationPermissions()

Implementation

static Future<bool> requestNotificationPermissions() async {
  bool isNotificationGranted = await isNotificationPermissionGranted();
  if (isNotificationGranted) {
    return true;
  }
  isNotificationGranted = isNotificationPermissionGrantedSync(
      await Permission.notification.request());
  return isNotificationGranted;
}