mapFromJson static method

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

Implementation

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

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

    return previousValue;
  });
}