hasPermissionIoWeb function
Implementation
Future<bool> hasPermissionIoWeb() async {
var permissionStatus = await Permission.storage.status;
developer.log('âšī¸ Permission status: $permissionStatus', name: 'Cached Media package');
if (permissionStatus != PermissionStatus.granted) {
developer.log('â Permission access was not granted', name: 'Cached Media package');
PermissionStatus permissionStatus1 = await Permission.storage.request();
developer.log('đĩī¸ââī¸ Permission requested', name: 'Cached Media package');
permissionStatus = permissionStatus1;
if (permissionStatus != PermissionStatus.granted) {
developer.log('â Permission denied', name: 'Cached Media package');
return false;
} else {
developer.log('â
Permission access granted', name: 'Cached Media package');
return true;
}
} else {
developer.log('â
Permission access granted', name: 'Cached Media package');
return true;
}
}