From 873bcef16155c5a8cc58f37eb645f71b14f34b18 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 25 Jun 2020 10:10:00 +0200 Subject: [PATCH] format --- lib/api/list_implementation.dart | 12 +++++++----- lib/api/namespace_implementation.dart | 4 ++-- lib/api/response.dart | 4 +--- lib/api/task_implementation.dart | 6 ++++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/api/list_implementation.dart b/lib/api/list_implementation.dart index aad7f9f..78bc9bd 100644 --- a/lib/api/list_implementation.dart +++ b/lib/api/list_implementation.dart @@ -22,19 +22,21 @@ class ListAPIService extends APIService implements ListService { @override Future get(int listId) { - return client.get('/lists/$listId').then((response) => TaskList.fromJson(response.body)); + return client + .get('/lists/$listId') + .then((response) => TaskList.fromJson(response.body)); } @override Future> getAll() { - return client.get('/lists').then( - (response) => convertList(response.body, (result) => TaskList.fromJson(result))); + return client.get('/lists').then((response) => + convertList(response.body, (result) => TaskList.fromJson(result))); } @override Future> getByNamespace(int namespaceId) { - return client.get('/namespaces/$namespaceId/lists').then( - (response) => convertList(response.body, (result) => TaskList.fromJson(result))); + return client.get('/namespaces/$namespaceId/lists').then((response) => + convertList(response.body, (result) => TaskList.fromJson(result))); } @override diff --git a/lib/api/namespace_implementation.dart b/lib/api/namespace_implementation.dart index 4286a92..dda454d 100644 --- a/lib/api/namespace_implementation.dart +++ b/lib/api/namespace_implementation.dart @@ -29,8 +29,8 @@ class NamespaceAPIService extends APIService implements NamespaceService { @override Future> getAll() { - return client.get('/namespaces').then( - (response) => convertList(response.body, (result) => Namespace.fromJson(result))); + return client.get('/namespaces').then((response) => + convertList(response.body, (result) => Namespace.fromJson(result))); } @override diff --git a/lib/api/response.dart b/lib/api/response.dart index 000b514..cfbf4b2 100644 --- a/lib/api/response.dart +++ b/lib/api/response.dart @@ -1,5 +1,3 @@ - - // This is a wrapper class to be able to return the headers up to the provider // to properly handle things like pagination with it. class Response { @@ -8,4 +6,4 @@ class Response { final dynamic body; final int statusCode; final Map headers; -} \ No newline at end of file +} diff --git a/lib/api/task_implementation.dart b/lib/api/task_implementation.dart index fa0f3c6..61f5d92 100644 --- a/lib/api/task_implementation.dart +++ b/lib/api/task_implementation.dart @@ -32,7 +32,9 @@ class TaskAPIService extends APIService implements TaskService { Future getAll(int listId, [Map> queryParameters]) { return client.get('/lists/$listId/tasks', queryParameters).then( - (response) => - new Response(convertList(response.body, (result) => Task.fromJson(result)), response.statusCode, response.headers)); + (response) => new Response( + convertList(response.body, (result) => Task.fromJson(result)), + response.statusCode, + response.headers)); } }