onSubmit method

void onSubmit()

Submit the form.

Implementation

void onSubmit() {
  if (_formKey.currentState?.validate() ?? true) {
    widget.onDone(_controller.text);
  }
}