checkPermissionList method
Future<List<NotificationPermission> >
checkPermissionList({
- String? channelKey,
- List<
NotificationPermission> permissions = const [NotificationPermission.Badge, NotificationPermission.Alert, NotificationPermission.Sound, NotificationPermission.Vibration, NotificationPermission.Light],
override
Check each individual permission to send notifications and returns only the allowed permissions
Implementation
@override
Future<List<NotificationPermission>> checkPermissionList(
{String? channelKey,
List<NotificationPermission> permissions = const [
NotificationPermission.Badge,
NotificationPermission.Alert,
NotificationPermission.Sound,
NotificationPermission.Vibration,
NotificationPermission.Light
]}) async {
List<Object?> permissionList = _listPermissionToListString(permissions);
permissionList = await methodChannel.invokeMethod(
CHANNEL_METHOD_CHECK_PERMISSIONS, {
NOTIFICATION_CHANNEL_KEY: channelKey,
NOTIFICATION_PERMISSIONS: permissionList
});
return _listStringToListPermission(permissionList);
}