requestPermissions static method

Future<bool> requestPermissions(
  1. List<Permission> permissions
)

Implementation

static Future<bool> requestPermissions(List<Permission> permissions) async{
  Map<Permission, PermissionStatus> statuses = await permissions.request();
  bool allGranted = true;
  for(PermissionStatus stat in statuses.values){
    allGranted = allGranted && stat.isGranted;
  }
  return allGranted;
}