requestPermissions method
Requests the user for access to the supplied list of Permission
s, if
they have not already been granted before.
Returns a Map containing the status per requested Permission
.
Implementation
Future<Map<Permission, PermissionStatus>> requestPermissions(
List<Permission> permissions) async {
final Map<Permission, PermissionStatus> permissionStatusMap = {};
for (final permission in permissions) {
try {
permissionStatusMap[permission] =
await _requestSingularPermission(permission);
} on UnimplementedError {
rethrow;
}
}
return permissionStatusMap;
}