listFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}