Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/meditohq/medito-app into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
michaelcspeed committed Jun 12, 2021
2 parents 5bbcdb6 + 76e7d90 commit c0a5788
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions lib/widgets/btm_nav/downloads_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,20 @@ class _DownloadsListWidgetState extends State<DownloadsListWidget>
hasCloseButton: true,
),
key: scaffoldKey,
body: _getDownloadList(),
body: _downloadList.isEmpty
? _getEmptyWidget()
: _getDownloadList(),
);
}

Widget _getDownloadList() {
if (_downloadList.isEmpty) {
return _getEmptyWidget();
} else {
return ListView.builder(
padding: EdgeInsets.symmetric(vertical: 8),
itemCount: _downloadList.length,
itemBuilder: (context, i) {
var item = _downloadList[i];
return _getSlidingItem(item, context);
});
}
return ListView.builder(
padding: EdgeInsets.symmetric(vertical: 8),
itemCount: _downloadList.length,
itemBuilder: (context, i) {
var item = _downloadList[i];
return _getSlidingItem(item, context);
});
}

Widget _getEmptyWidget() => EmptyStateWidget(
Expand All @@ -80,6 +78,7 @@ class _DownloadsListWidgetState extends State<DownloadsListWidget>
if (mounted) {
_downloadList.removeWhere((element) => element == item);
DownloadsBloc.removeSessionFromDownloads(context, item);
setState(() {});
}

createSnackBar(
Expand Down

0 comments on commit c0a5788

Please sign in to comment.