listFromJson static method

List<ExportData> listFromJson(
  1. List? json
)

Implementation

static List<ExportData> listFromJson(List<dynamic>? json) {
  if (json == null) {
    return <ExportData>[];
  }

  return json.fold(<ExportData>[], (List<ExportData> previousValue, element) {
    final ExportData? object = ExportData.fromJson(element);
    if (object is ExportData) {
      previousValue.add(object);
    }

    return previousValue;
  });
}