mapFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}