validate form before saving
This commit is contained in:
1 parent
8f3afc3bd7
commit
62af007799
1 file changed
+2
@@ -191,6 +191,7 @@ class _TaskEditPageState extends State<TaskEditPage> {
|
||||
}
|
||||
|
||||
void onSavePressed() {
|
||||
if (formKey.currentState!.validate()) {
|
||||
Navigator.of(context).pop(
|
||||
CreateTaskRequest(
|
||||
title: titleController.text,
|
||||
@@ -218,6 +219,7 @@ class _TaskEditPageState extends State<TaskEditPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void onPopInvoked(bool didPop, Object? result) {
|
||||
if (!didPop) {
|
||||
|
||||
Reference in new issue
Block a user