Describe the bug
Trying to add chat like YouTube.
Using some of your example package.
Error cause members is null when sending message.
What package are you using? What version?
Last
What platform is it about?
iOS
Code
final client = StreamChat.of(context).client;
final channel = client.channel(
'livestream',
id: postId,
);
if (channel.state == null) {
await channel.watch();
}
await Navigator.of(
context,
rootNavigator: true,
).push(
MaterialPageRoute(
builder: (context) => StreamChannel(
channel: channel,
child: const ChannelPage(), // From your example package
),
fullscreenDialog: true),
);
Error
final currentUserMember =
members.firstWhere((e) => e.user!.id == currentUser!.id);
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following StateError was thrown building:
flutter: Bad state: No element
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 ListMixin.firstWhere (dart:collection/list.dart:167:5)
flutter: #1 _MessageListViewState.buildMessage
package:stream_chat_flutter/src/message_list_view.dart:930
flutter: #2 _MessageListViewState._buildBottomMessage
package:stream_chat_flutter/src/message_list_view.dart:750
flutter: #3 _MessageListViewState._buildListView.<anonymous closure>.<anonymous closure>
package:stream_chat_flutter/src/message_list_view.dart:56
Maybe im not using 'livestream' channels correctly; but isn't It suppose to allow everyone to post a message without being a member ? or member is added dynamically ?
Describe the bug Trying to add chat like YouTube. Using some of your example package. Error cause members is null when sending message.
What package are you using? What version? Last
What platform is it about? iOS
Code
Error
Maybe im not using 'livestream' channels correctly; but isn't It suppose to allow everyone to post a message without being a member ? or member is added dynamically ?
Thank you, Nelson