mapFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}