Check permission if app can manage external storage if its android 11 or greater
Note: This is a runtime permission (might not show it in app info's permission section )
var status = awaitPermission.manageExternalStorage.status;
if (status!.isRestricted) {
status = awaitPermission.manageExternalStorage.request();
}
if (status!.isDenied) {
status = awaitPermission.manageExternalStorage.request();
}
if (status!.isPermanentlyDenied) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
backgroundColor: Colors.green,
content: Text('Please add permission for app to manage external storage'),
));
}