mapFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}