I'm using a FormTextField
in a Flutter app
To update a certain column value, the user types in the FormTextField
, otherwise leaves the field empty.
I tried this code, but it was adding a null
value to the column, deleting the existing value. I'm not happy with this behavior.
String _getProd5Name() {
if ((_prod5Controller.text).isNotEmpty == true) {
_prod5String = _prod5Controller.text;
}
return _prod5String;
}
Is there a way to do it?
I found similar questions, but they are relevant to other languages and their solutions don't solve my case.
question from:https://stackoverflow.com/questions/65557318/empty-form-text-filed