submit method
Validate and persist field values, then call DataFormBody.saveItem. Used by the in-form Save button and the AppBar popup menu so both paths send the values currently on screen, not the row as loaded.
Implementation
bool submit() {
final FormState? form = _formKey.currentState;
if (form == null || !form.validate()) return false;
form.save();
widget.saveItem(widget.selectedItem);
return true;
}