powerSourceV2FromJson function

PowerSourceV2 powerSourceV2FromJson(
  1. Object? powerSourceV2, [
  2. PowerSourceV2? defaultValue
])

Implementation

enums.PowerSourceV2 powerSourceV2FromJson(
  Object? powerSourceV2, [
  enums.PowerSourceV2? defaultValue,
]) {
  return enums.PowerSourceV2.values
          .firstWhereOrNull((e) => e.value == powerSourceV2) ??
      defaultValue ??
      enums.PowerSourceV2.swaggerGeneratedUnknown;
}