eventAction method

dynamic eventAction(
  1. bool isForStorage,
  2. bool isFromPicker,
  3. PermissionType permissionType,
  4. int index,
  5. Map<Permission, PermissionStatus> status,
)

On click of allow or denied event this method will be called...

Implementation

eventAction(
    bool isForStorage,
    bool isFromPicker,
    PermissionType permissionType,
    int index,
    Map<Permission, PermissionStatus> status) {
  if (status[isForStorage
          ? Platform.isIOS
              ? Permission.photos
              : Permission.storage
          : Permission.camera] ==
      PermissionStatus.granted) {
    add(AllowPermissionEvent(isFromPicker, permissionType, index));
  } else {
    add(DenyPermissionEvent(isFromPicker, permissionType, index));
  }
}