Format
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2020-01-13 22:47:40 +01:00
parent cf9c9b4cb4
commit 187337c580
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,8 @@ class TaskAPIService extends APIService implements TaskService {
@override
Future<List<Task>> getAll(int listId) {
return client.get('/lists/$listId/tasks').then(
(list) => convertList(list, (result) => Task.fromJson(result)));
return client
.get('/lists/$listId/tasks')
.then((list) => convertList(list, (result) => Task.fromJson(result)));
}
}

View File

@ -31,7 +31,10 @@ class Task {
description = json['description'],
text = json['text'],
done = json['done'],
owner = json['createdBy'].toString() == "null" ? null : User.fromJson(json['createdBy']); // There has to be a better way of doing this...
owner = json['createdBy'].toString() == "null"
? null
: User.fromJson(json[
'createdBy']); // There has to be a better way of doing this...
toJSON() => {
'id': id,

View File

@ -25,8 +25,7 @@ class _ListPageState extends State<ListPage> {
@override
void initState() {
_list = TaskList(
id: widget.taskList.id, title: widget.taskList.title);
_list = TaskList(id: widget.taskList.id, title: widget.taskList.title);
super.initState();
}
@ -97,10 +96,7 @@ class _ListPageState extends State<ListPage> {
_loading = false;
_list = list;
// Load tasks
VikunjaGlobal.of(context)
.taskService
.getAll(list.id)
.then((tasks) {
VikunjaGlobal.of(context).taskService.getAll(list.id).then((tasks) {
setState(() {
_tasks = tasks;
});