Line data Source code
1 : part of apptive_grid_model; 2 : 3 : /// Model for a [FormComponent] representing [StringDataEntity] 4 : class StringFormComponent extends FormComponent<StringDataEntity> { 5 : /// Creates a FormComponent 6 2 : StringFormComponent({ 7 : required this.property, 8 : required this.data, 9 : this.options = const TextComponentOptions(), 10 : required this.fieldId, 11 : this.required = false, 12 : }); 13 : 14 : /// Deserializes [json] into a [FormComponent] 15 4 : StringFormComponent.fromJson(Map<String, dynamic> json) 16 4 : : property = json['property'], 17 8 : data = StringDataEntity(json['value']), 18 8 : options = TextComponentOptions.fromJson(json['options']), 19 4 : required = json['required'], 20 4 : fieldId = json['fieldId']; 21 : 22 : @override 23 : final String property; 24 : @override 25 : StringDataEntity data; 26 : @override 27 : final String fieldId; 28 : @override 29 : final TextComponentOptions options; 30 : @override 31 : final bool required; 32 : }