validate form before saving

This commit is contained in:
2026-07-20 14:40:29 +02:00
parent 8f3afc3bd7
commit 62af007799
+2
View File
@@ -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) {