askForPermission method
dynamic
askForPermission(
- PermissionStatus permissionStatus,
- bool isFromPicker,
- PermissionType permissionType,
- int index,
Ask permission events
Implementation
askForPermission(PermissionStatus permissionStatus, bool isFromPicker,
PermissionType permissionType, int index) async {
try {
if (await Permissions.cameraAndStoragePermissionsGranted()) {
add(AllowPermissionEvent(isFromPicker, permissionType, index));
} else {
add(AskPermissionEvent(isFromPicker, permissionType, index));
}
} catch (e) {
debugPrint('Camera Exception ::: $e');
}
}