validate form before saving
This commit is contained in:
@@ -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