parseList<T> function

List<T>? parseList<T>(
  1. dynamic values,
  2. T fromJson(
    1. dynamic
    )
)

Implementation

List<T>? parseList<T>(dynamic values, T Function(dynamic) fromJson) {
  if (values == null) {
    return null;
  }
  Iterable<dynamic> list = values;
  return list.map<T>((value) => fromJson(value)).toList();
}