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:
parent
2a78ccaae4
commit
69a8608390
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user