requestPermissions static method
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;
}