FieldEntityModel.fromJson constructor
FieldEntityModel.fromJson(
- Map<String, dynamic> json
)
Implementation
factory FieldEntityModel.fromJson(Map<String, dynamic> json) => FieldEntityModel(
fieldType: json["field_type"] ?? '',
typeValue: json["type_value"] ?? '',
name: json["name"] ?? '',
label: json["label"] ?? '',
helpText: json["help_text"],
placeholder: json["placeholder"],
defaultValue: json["default_value"],
requiredField: json["required_field"] ?? false,
uniqueField: json["unique_field"] ?? false,
format: json["format"],
choices: json["choices"] != null
? List<ChoiceEntity>.from(json["choices"].map((x) => ChoiceEntity.fromJson(x)))
: null,
properties: Map<String, dynamic>.from(json)
..removeWhere((key, _) => _knownFieldKeys.contains(key)),
);