fromJson static method

OrganizationPreferences? fromJson(
  1. Map<String, dynamic>? json
)

Returns a new OrganizationPreferences instance and imports its values from json if it's non-null, null if json is null.

Implementation

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

  return OrganizationPreferences(
    categoryRequired: json[r'categoryRequired'],
    contract: PreferencesContract.fromJson(json[r'contract']),
    electronicSignature:
        PreferencesElectronicSignature.fromJson(json[r'electronicSignature']),
    equipment: PreferencesEquipment.fromJson(json[r'equipment']),
    feedbackParentPlace: json[r'feedbackParentPlace'],
    form: PreferencesForm.fromJson(json[r'form']),
    offline: json[r'offline'],
    public: json[r'public'],
    reference: PreferencesReference.fromJson(json[r'reference']),
    reverseGeocoding: json[r'reverseGeocoding'],
    reviewEnabled: json[r'reviewEnabled'],
  );
}