deviceHostDTOListFromJson function

List<DeviceHostDTO> deviceHostDTOListFromJson(
  1. List? deviceHostDTO, [
  2. List<DeviceHostDTO>? defaultValue
])

Implementation

List<enums.DeviceHostDTO> deviceHostDTOListFromJson(
  List? deviceHostDTO, [
  List<enums.DeviceHostDTO>? defaultValue,
]) {
  if (deviceHostDTO == null) {
    return defaultValue ?? [];
  }

  return deviceHostDTO.map((e) => deviceHostDTOFromJson(e.toString())).toList();
}