peripheralV2PathParamNullableFromJson function

PeripheralV2PathParam? peripheralV2PathParamNullableFromJson(
  1. Object? peripheralV2PathParam, [
  2. PeripheralV2PathParam? defaultValue
])

Implementation

enums.PeripheralV2PathParam? peripheralV2PathParamNullableFromJson(
  Object? peripheralV2PathParam, [
  enums.PeripheralV2PathParam? defaultValue,
]) {
  if (peripheralV2PathParam == null) {
    return null;
  }
  return enums.PeripheralV2PathParam.values
          .firstWhereOrNull((e) => e.value == peripheralV2PathParam) ??
      defaultValue;
}