fixed membercount null error

This commit is contained in:
Deven Joshi
2021-11-16 17:18:54 +05:30
parent a3cce7ffff
commit 643f809eba
2 changed files with 8 additions and 1 deletions
@@ -1,3 +1,9 @@
## Upcoming
🐞 Fixed
- Fixed `MessageWidget` null errors associated with `channel.memberCount`.
## 3.2.0
- Updated Dart SDK constraints to `>=2.14.0 <3.0.0`
@@ -1230,6 +1230,7 @@ class _MessageWidgetState extends State<MessageWidget>
Widget _buildSendingIndicator() {
final style = widget.messageTheme.createdAtStyle;
final message = widget.message;
final memberCount = StreamChannel.of(context).channel.memberCount ?? 0;
if (hasNonUrlAttachments &&
(message.status == MessageSendingStatus.sending ||
@@ -1260,7 +1261,7 @@ class _MessageWidgetState extends State<MessageWidget>
if (isMessageRead) {
child = Row(
children: [
if (StreamChannel.of(context).channel.memberCount! > 2)
if (memberCount > 2)
Text(
widget.readList!.length.toString(),
style: style.copyWith(