productDTONullableListFromJson function

List<ProductDTO>? productDTONullableListFromJson(
  1. List? productDTO, [
  2. List<ProductDTO>? defaultValue
])

Implementation

List<enums.ProductDTO>? productDTONullableListFromJson(
  List? productDTO, [
  List<enums.ProductDTO>? defaultValue,
]) {
  if (productDTO == null) {
    return defaultValue;
  }

  return productDTO.map((e) => productDTOFromJson(e.toString())).toList();
}