fix(core): fix stream channel shows black screen while loading.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-05-31 16:47:51 +05:30
committed by xsahil03x
parent a14731feea
commit e9ef9fcf41
@@ -251,14 +251,14 @@ class StreamChannelState extends State<StreamChannel> {
channel.state!.truncate(); channel.state!.truncate();
if (messageId == null) { if (messageId == null) {
await channel.query( final state = await channel.query(
messagesPagination: PaginationParams( messagesPagination: PaginationParams(
limit: limit, limit: limit,
), ),
preferOffline: preferOffline, preferOffline: preferOffline,
); );
channel.state!.isUpToDate = true; channel.state!.isUpToDate = true;
return null; return state;
} }
return channel.query( return channel.query(
@@ -451,7 +451,7 @@ class StreamChannelState extends State<StreamChannel> {
return widget.child; return widget.child;
}, },
); );
if (initialMessageId != null) { if (_futures.length > 1) {
child = Material(child: child); child = Material(child: child);
} }
return child; return child;