forked from vikunja/app
Fixed task add not working
This commit is contained in:
parent
974c3c1774
commit
eab23b6e72
|
@ -42,44 +42,37 @@ class _ListPageState extends State<ListPage> {
|
|||
tasks.addAll(_loadingTasks.map(_buildLoadingTile));
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: new Text(_list.title),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.edit),
|
||||
onPressed: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ListEditPage(
|
||||
list: _list,
|
||||
))))
|
||||
],
|
||||
),
|
||||
body: !this._loading
|
||||
? 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.')),
|
||||
)
|
||||
: Center(child: CircularProgressIndicator()),
|
||||
floatingActionButton: Builder(
|
||||
builder: (context) => FloatingActionButton(
|
||||
//onPressed: () => _addItemDialog(context), child: Icon(Icons.add)),
|
||||
onPressed: () {
|
||||
print('test');
|
||||
setState(() {
|
||||
tasks = null;
|
||||
});
|
||||
},
|
||||
child: Icon(Icons.add),
|
||||
),
|
||||
));
|
||||
appBar: AppBar(
|
||||
title: new Text(_list.title),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.edit),
|
||||
onPressed: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ListEditPage(
|
||||
list: _list,
|
||||
))))
|
||||
],
|
||||
),
|
||||
body: !this._loading
|
||||
? 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.')),
|
||||
)
|
||||
: Center(child: CircularProgressIndicator()),
|
||||
floatingActionButton: Builder(
|
||||
builder: (context) => FloatingActionButton(
|
||||
onPressed: () => _addItemDialog(context), child: Icon(Icons.add)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<Widget> _listTasks() {
|
||||
|
|
Loading…
Reference in New Issue