forked from vikunja/app
Don't try to show a task tile if there is none for the current index
This commit is contained in:
parent
78ddbecd19
commit
5f7d59c7ea
|
@ -77,9 +77,9 @@ class _ListPageState extends State<ListPage> {
|
||||||
// in _loadTasksForPage()?
|
// in _loadTasksForPage()?
|
||||||
_loadTasksForPage(_currentPage);
|
_loadTasksForPage(_currentPage);
|
||||||
}
|
}
|
||||||
return TaskTile(
|
return index < _tasks.length ? TaskTile(
|
||||||
task: _tasks[index],
|
task: _tasks[index],
|
||||||
);
|
): null;
|
||||||
})
|
})
|
||||||
: Center(child: Text('This list is empty.')),
|
: Center(child: Text('This list is empty.')),
|
||||||
onRefresh: _loadList,
|
onRefresh: _loadList,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user