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