mapFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}