Don't try to show a task tile if there is none for the current index
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2020-01-16 22:08:26 +01:00
parent 78ddbecd19
commit 5f7d59c7ea
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 2 deletions

View File

@ -77,9 +77,9 @@ class _ListPageState extends State<ListPage> {
// in _loadTasksForPage()?
_loadTasksForPage(_currentPage);
}
return TaskTile(
return index < _tasks.length ? TaskTile(
task: _tasks[index],
);
): null;
})
: Center(child: Text('This list is empty.')),
onRefresh: _loadList,