powerSourceDTOListFromJson function
- List? powerSourceDTO, [
- List<
PowerSourceDTO> ? defaultValue
Implementation
List<enums.PowerSourceDTO> powerSourceDTOListFromJson(
List? powerSourceDTO, [
List<enums.PowerSourceDTO>? defaultValue,
]) {
if (powerSourceDTO == null) {
return defaultValue ?? [];
}
return powerSourceDTO
.map((e) => powerSourceDTOFromJson(e.toString()))
.toList();
}