format
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
konrad 2019-03-22 23:00:49 +01:00
parent e97cd9a2f9
commit aeb7a445a4
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 7 additions and 5 deletions

View File

@ -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)));
}
}

View File

@ -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();