샘플 앱의 예제대로 아래 처럼 구성해 놓았으나
unreadMembers 가 값이 계속 들어있습니다. 무엇이 문제일까요?
@override
Future<void> onMessagesAdded(
MessageContext context,
GroupChannel channel,
List<BaseMessage> messages,
) async {
_state._refresh();
_state._collection?.markAsRead(context);
}
Future<void> _refresh() async {
if (mounted) {
setState(() {
if (_collection != null) {
messageList = _collection!.messageList;
hasPrevious = _collection!.params.reverse
? _collection!.hasNext
: _collection!.hasPrevious;
hasNext = _collection!.params.reverse
? _collection!.hasPrevious
: _collection!.hasNext;
}
});
}
}
final unreadMembers = (collection != null)
? collection!.channel.getUnreadMembers(message)
: [];