fromJson static method

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

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

Implementation

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

  return PreferencesForm(
    hidden:
        json[r'hidden'] == null ? null : List<String>.from(json[r'hidden']),
    required_: json[r'required'] == null
        ? null
        : List<String>.from(json[r'required']),
  );
}