requestPermissions method

Future<bool> requestPermissions({
  1. bool alert = true,
  2. bool badge = true,
  3. bool sound = true,
})

Request push notifications permissions with options.

On iOS, these control the granular permissions On Android, it has no effect It returns true if granted or false if denied.

Implementation

Future<bool> requestPermissions({
  bool alert = true,
  bool badge = true,
  bool sound = true,
}) =>
    defaultPlugin.requestPermissions(
      alert: alert,
      badge: badge,
      sound: sound,
    );