requestPermissions method
Ensure to requests photo library permission before access
return true if permission is granted, otherwise false
Implementation
@override
Future<bool> requestPermissions() async {
version = await getVersion();
if (!allowed) {
final permission = await _getPermissionsGroup();
allowed = await permission.request().isGranted;
if (!allowed) {
throw Exception("error_accessdenied");
}
}
return allowed;
}