fixed membercount null error
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
## Upcoming
|
||||||
|
|
||||||
|
🐞 Fixed
|
||||||
|
|
||||||
|
- Fixed `MessageWidget` null errors associated with `channel.memberCount`.
|
||||||
|
|
||||||
## 3.2.0
|
## 3.2.0
|
||||||
|
|
||||||
- Updated Dart SDK constraints to `>=2.14.0 <3.0.0`
|
- Updated Dart SDK constraints to `>=2.14.0 <3.0.0`
|
||||||
|
|||||||
@@ -1230,6 +1230,7 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
Widget _buildSendingIndicator() {
|
Widget _buildSendingIndicator() {
|
||||||
final style = widget.messageTheme.createdAtStyle;
|
final style = widget.messageTheme.createdAtStyle;
|
||||||
final message = widget.message;
|
final message = widget.message;
|
||||||
|
final memberCount = StreamChannel.of(context).channel.memberCount ?? 0;
|
||||||
|
|
||||||
if (hasNonUrlAttachments &&
|
if (hasNonUrlAttachments &&
|
||||||
(message.status == MessageSendingStatus.sending ||
|
(message.status == MessageSendingStatus.sending ||
|
||||||
@@ -1260,7 +1261,7 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
if (isMessageRead) {
|
if (isMessageRead) {
|
||||||
child = Row(
|
child = Row(
|
||||||
children: [
|
children: [
|
||||||
if (StreamChannel.of(context).channel.memberCount! > 2)
|
if (memberCount > 2)
|
||||||
Text(
|
Text(
|
||||||
widget.readList!.length.toString(),
|
widget.readList!.length.toString(),
|
||||||
style: style.copyWith(
|
style: style.copyWith(
|
||||||
|
|||||||
Reference in New Issue
Block a user