Migration from `Snackbar` to `FormField` validation for empty text edge handling.
Is your feature request related to a problem? Please describe.
At present, when a user tries to save an empty string, the app shows an error using a Snackbar. However, since the input is inside a modal dialog (which has a barrier), the Snackbar appears behind the dialog and may often be missed by users.
Describe the solution you'd like
Replace the Snackbar-based error with inline form validation. Instead of showing an external message, display the error directly below the text field, turning the border red and showing "Text cannot be empty" when submission is attempted without input.
Approach to be followed
- Migrate from
TextFieldto aTextFormFieldwrapped inside aForm. - Migrate from TextField to a TextFormField, wrapped in a Form widget.
- Use a GlobalKey
to validate the form before submission. - Implement a validator that checks for empty input and returns a string error message.
- Prevent Navigator.pop() unless the form validates successfully.
Additional context
This approach will make the feedback visible and immediate, directly tied to the input field. It also aligns with common UX practices in form-based dialogs across platforms.
Thank you for opening this issue! 🚀 Our team will review it soon. Please make sure you've included all relevant details and followed our Contributing Guidelines. For questions about our project, check out our README and Code of Conduct.
@may-tas please assign me the issue