markAsRead doesn't seem to be updating properly

I followed the example in the sample app, but the
unreadMembers is still containing values. What could be the problem?

@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)
        : [];