mapFromJson static method

Map<String, DocumentLinksFile> mapFromJson(
  1. Map<String, dynamic>? json
)

Implementation

static Map<String, DocumentLinksFile> mapFromJson(
    Map<String, dynamic>? json) {
  if (json == null) {
    return <String, DocumentLinksFile>{};
  }

  return json.entries.fold(<String, DocumentLinksFile>{},
      (Map<String, DocumentLinksFile> previousValue, element) {
    final DocumentLinksFile? object =
        DocumentLinksFile.fromJson(element.value);
    if (object is DocumentLinksFile) {
      previousValue[element.key] = object;
    }

    return previousValue;
  });
}