1
0
mirror of https://github.com/go-vikunja/app synced 2024-06-02 18:49:47 +00:00

added delete to task page

This commit is contained in:
Benimautner 2023-05-16 22:12:11 +02:00
parent 2a78ccaae4
commit 69a8608390

View File

@ -80,6 +80,12 @@ class _TaskEditPageState extends State<TaskEditPage> {
child: Scaffold(
appBar: AppBar(
title: Text('Edit Task'),
actions: [
IconButton(
icon: Icon(Icons.delete),
onPressed: () {_delete(widget.task.id);}
),
],
),
body: Builder(
builder: (BuildContext context) => SafeArea(
@ -470,6 +476,11 @@ class _TaskEditPageState extends State<TaskEditPage> {
});
}
_delete(int taskId) {
VikunjaGlobal.of(context).taskService.delete(taskId);
Navigator.pop(context);
}
_searchLabel(String query) {
return VikunjaGlobal.of(context)
.labelService