add null check to channel list view

This commit is contained in:
Salvatore Giordano
2021-07-21 12:21:25 +02:00
parent 9776fc5dfd
commit 7d1259ce18
@@ -231,13 +231,21 @@ class _ChannelListViewState extends State<ChannelListView> {
);
}
return ColoredBox(
color: ChannelListViewTheme.of(context).backgroundColor!,
child: LazyLoadScrollView(
onEndOfPage: () => _channelListController.paginateData!(),
child: child,
),
child = LazyLoadScrollView(
onEndOfPage: () => _channelListController.paginateData!(),
child: child,
);
final backgroundColor = ChannelListViewTheme.of(context).backgroundColor;
if (backgroundColor != null) {
return ColoredBox(
color: backgroundColor,
child: child,
);
}
return child;
}
Widget _buildListView(BuildContext context, List<Channel> channels) {