add no channels info text

This commit is contained in:
Salvatore Giordano
2020-09-08 09:29:43 +02:00
parent 241e18f609
commit b97d102389
+19
View File
@@ -211,6 +211,25 @@ class _ChannelListViewState extends State<ChannelListView>
}
final channels = snapshot.data;
if (channels.isEmpty) {
return LayoutBuilder(
builder: (context, viewportConstraints) {
return SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: viewportConstraints.maxHeight,
),
child: Center(
child: Text('You have no channels currently'),
),
),
);
},
);
}
return ListView.custom(
physics: AlwaysScrollableScrollPhysics(),
controller: _scrollController,