powerSourceDTOFromJson function

PowerSourceDTO powerSourceDTOFromJson(
  1. Object? powerSourceDTO, [
  2. PowerSourceDTO? defaultValue
])

Implementation

enums.PowerSourceDTO powerSourceDTOFromJson(
  Object? powerSourceDTO, [
  enums.PowerSourceDTO? defaultValue,
]) {
  return enums.PowerSourceDTO.values
          .firstWhereOrNull((e) => e.value == powerSourceDTO) ??
      defaultValue ??
      enums.PowerSourceDTO.swaggerGeneratedUnknown;
}