format
This commit is contained in:
parent
e97cd9a2f9
commit
aeb7a445a4
|
@ -14,7 +14,7 @@ class LabelTaskBulkAPIService extends APIService
|
||||||
return client
|
return client
|
||||||
.post('/tasks/${task.id}/labels/bulk',
|
.post('/tasks/${task.id}/labels/bulk',
|
||||||
body: LabelTaskBulk(labels: labels).toJSON())
|
body: LabelTaskBulk(labels: labels).toJSON())
|
||||||
.then(
|
.then((map) =>
|
||||||
(map) => convertList(map['labels'], (result) => Label.fromJson(result)));
|
convertList(map['labels'], (result) => Label.fromJson(result)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,8 @@ class _TaskEditPageState extends State<TaskEditPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => _createAndAddLabel(_labelTypeAheadController.text),
|
onPressed: () =>
|
||||||
|
_createAndAddLabel(_labelTypeAheadController.text),
|
||||||
icon: Icon(Icons.add),
|
icon: Icon(Icons.add),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -376,8 +377,9 @@ class _TaskEditPageState extends State<TaskEditPage> {
|
||||||
_createAndAddLabel(String labelTitle) {
|
_createAndAddLabel(String labelTitle) {
|
||||||
Label newLabel = Label(title: labelTitle);
|
Label newLabel = Label(title: labelTitle);
|
||||||
VikunjaGlobal.of(context)
|
VikunjaGlobal.of(context)
|
||||||
.labelService.create(newLabel)
|
.labelService
|
||||||
.then((createdLabel) {
|
.create(newLabel)
|
||||||
|
.then((createdLabel) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_labels.add(createdLabel);
|
_labels.add(createdLabel);
|
||||||
_labelTypeAheadController.clear();
|
_labelTypeAheadController.clear();
|
||||||
|
|
Reference in New Issue
Block a user