toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'key': key,
      'type': type.name,
      if (label != null) 'label': label,
      if (hint != null) 'hint': hint,
      if (required) 'required': required,
      if (readOnly) 'readOnly': readOnly,
      if (defaultValue != null) 'defaultValue': defaultValue,
      if (options != null) 'options': options,
      if (flex != 1) 'flex': flex,
    };