Merge pull request #774 from GetStream/fix/memberCount
fix(ui): membercount null error
This commit is contained in:
@@ -33,7 +33,7 @@ jobs:
|
||||
flutter-version: ${{ env.flutter_version }}
|
||||
|
||||
- name: "Install Tools"
|
||||
run: flutter pub global activate melos 1.0.0-dev.6
|
||||
run: flutter pub global activate melos 1.0.0-dev.10
|
||||
- name: "Bootstrap Workspace"
|
||||
run: melos bootstrap
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
flutter-version: ${{ env.flutter_version }}
|
||||
- name: "Install Tools"
|
||||
run: |
|
||||
flutter pub global activate melos 1.0.0-dev.6
|
||||
flutter pub global activate melos 1.0.0-dev.10
|
||||
- name: "Bootstrap Workspace"
|
||||
run: melos bootstrap
|
||||
- name: "Dart Analyze"
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user