listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}