getPhotoPermission static method
dynamic
getPhotoPermission()
Implementation
static getPhotoPermission() async {
Map<String, bool> status = <String, bool>{'Photos and Videos': false};
try {
status = await requestGalleryPermission();
} catch (e) {}
try {
if (!status.values.elementAt(0)) {
status = await requestPhotoPermission();
}
} catch (e) {}
try {
if (!status.values.elementAt(0)) {
status = await requestMediaPermission();
}
} catch (e) {}
return status;
}