hasNotificationPermission method

Future<bool> hasNotificationPermission()

Check if the app already has notification permission.

Implementation

Future<bool> hasNotificationPermission() async {
  NotificationSettings settings =
      await _firebaseMessaging.getNotificationSettings();
  return settings.authorizationStatus == AuthorizationStatus.authorized;
}