forked from vikunja/app
format
This commit is contained in:
parent
629db81c22
commit
974c3c1774
|
@ -21,7 +21,8 @@ class LabelTaskAPIService extends APIService implements LabelTaskService {
|
|||
|
||||
@override
|
||||
Future<List<Label>> getAll(LabelTask lt, {String query}) async {
|
||||
String params = query == '' ? null : '?s=' + Uri.encodeQueryComponent(query);
|
||||
String params =
|
||||
query == '' ? null : '?s=' + Uri.encodeQueryComponent(query);
|
||||
return client.get('/tasks/${lt.task.id}/labels$params').then(
|
||||
(label) => convertList(label, (result) => Label.fromJson(result)));
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@ class LabelAPIService extends APIService implements LabelService {
|
|||
|
||||
@override
|
||||
Future<List<Label>> getAll({String query}) {
|
||||
String params = query == '' ? null : '?s=' + Uri.encodeQueryComponent(query);
|
||||
String params =
|
||||
query == '' ? null : '?s=' + Uri.encodeQueryComponent(query);
|
||||
return client.get('/labels$params').then(
|
||||
(label) => convertList(label, (result) => Label.fromJson(result)));
|
||||
}
|
||||
|
|
|
@ -34,7 +34,8 @@ class Label {
|
|||
'id': id,
|
||||
'title': title,
|
||||
'description': description,
|
||||
'hex_color': color?.value?.toRadixString(16)?.padLeft(8, '0')?.substring(2),
|
||||
'hex_color':
|
||||
color?.value?.toRadixString(16)?.padLeft(8, '0')?.substring(2),
|
||||
'created_by': createdBy?.toJSON(),
|
||||
'updated': updated?.millisecondsSinceEpoch,
|
||||
'created': created?.millisecondsSinceEpoch,
|
||||
|
|
|
@ -59,13 +59,13 @@ class _ListPageState extends State<ListPage> {
|
|||
? RefreshIndicator(
|
||||
onRefresh: _loadList,
|
||||
child: _list.tasks.length > 0
|
||||
?
|
||||
ListView(
|
||||
padding: EdgeInsets.symmetric(vertical: 8.0),
|
||||
children: ListTile.divideTiles(context: context, tiles: tasks)
|
||||
.toList(),
|
||||
)
|
||||
: Center(child: Text('This list is empty.')),
|
||||
? ListView(
|
||||
padding: EdgeInsets.symmetric(vertical: 8.0),
|
||||
children:
|
||||
ListTile.divideTiles(context: context, tiles: tasks)
|
||||
.toList(),
|
||||
)
|
||||
: Center(child: Text('This list is empty.')),
|
||||
)
|
||||
: Center(child: CircularProgressIndicator()),
|
||||
floatingActionButton: Builder(
|
||||
|
|
Loading…
Reference in New Issue