toJson method
Serializes FormFieldProperties to json
This does not include the fieldId since it is used as the key to a map of FormFieldProperties jsons
Implementation
Map<String, dynamic> toJson() {
return {
if (pageId != null) 'pageId': pageId,
if (positionOnPage != null) 'fieldIndex': positionOnPage,
if (defaultValue != null) 'defaultValue': defaultValue!.schemaValue,
if (hidden) 'hidden': true,
if (disabled) 'disabled': true,
};
}