add null check to message search list view
This commit is contained in:
@@ -144,9 +144,8 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
|
||||
widget.messageSearchListController ?? _defaultController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => ColoredBox(
|
||||
color: MessageSearchListViewTheme.of(context).backgroundColor!,
|
||||
child: MessageSearchListCore(
|
||||
Widget build(BuildContext context) {
|
||||
final messageSearchListCore = MessageSearchListCore(
|
||||
filters: widget.filters,
|
||||
sortOptions: widget.sortOptions,
|
||||
messageQuery: widget.messageQuery,
|
||||
@@ -197,9 +196,18 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
|
||||
),
|
||||
),
|
||||
childBuilder: widget.childBuilder ?? _buildListView,
|
||||
),
|
||||
);
|
||||
|
||||
final backgroundColor =
|
||||
MessageSearchListViewTheme.of(context).backgroundColor;
|
||||
return backgroundColor != null
|
||||
? ColoredBox(
|
||||
color: backgroundColor,
|
||||
child: messageSearchListCore,
|
||||
)
|
||||
: messageSearchListCore;
|
||||
}
|
||||
|
||||
Widget _separatorBuilder(BuildContext context, int index) => Container(
|
||||
height: 1,
|
||||
color: StreamChatTheme.of(context).colorTheme.borders,
|
||||
|
||||
Reference in New Issue
Block a user