removeReaction method

void removeReaction(
  1. String messageId,
  2. String emoji
)

Removes a reaction with the given emoji from a messageId.

Implementation

void removeReaction(String messageId, String emoji) {
  final reactions = _messageReactions[messageId] ?? [];
  reactions.removeWhere((r) => r.emoji == emoji && r.userId == currentUserId);
  _messageReactions[messageId] = reactions;
  notifyListeners();
}