getPermissionRequestResultFromString function Null safety

PermissionRequestResult getPermissionRequestResultFromString(
  1. String? value
)

Returns the permission request result from value.

Implementation

PermissionRequestResult getPermissionRequestResultFromString(String? value) {
  return PermissionRequestResult.values.firstWhere(
      (e) => e.toString() == 'PermissionRequestResult.$value',
      orElse: () => PermissionRequestResult.PERMANENTLY_DENIED);
}