listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}