powerSourceV2ListFromJson function

List<PowerSourceV2> powerSourceV2ListFromJson(
  1. List? powerSourceV2, [
  2. List<PowerSourceV2>? defaultValue
])

Implementation

List<enums.PowerSourceV2> powerSourceV2ListFromJson(
  List? powerSourceV2, [
  List<enums.PowerSourceV2>? defaultValue,
]) {
  if (powerSourceV2 == null) {
    return defaultValue ?? [];
  }

  return powerSourceV2.map((e) => powerSourceV2FromJson(e.toString())).toList();
}