powerSourceDTOListToJson function

List<String> powerSourceDTOListToJson(
  1. List<PowerSourceDTO>? powerSourceDTO
)

Implementation

List<String> powerSourceDTOListToJson(
    List<enums.PowerSourceDTO>? powerSourceDTO) {
  if (powerSourceDTO == null) {
    return [];
  }

  return powerSourceDTO.map((e) => e.value!).toList();
}