removeMessage abstract method

Future<void> removeMessage(
  1. Message message
)

Removes a specific message from the list. The message parameter is used to identify the message to be removed, typically by its id.

When implementing, the message parameter might refer to an outdated instance if it has been updated elsewhere. To ensure correctness:

  1. Identify the message in your data store using message.id.
  2. Retrieve the current version of that message from your store.
  3. The emitted ChatOperation.remove(currentMessageFromStore, index) must use this currentMessageFromStore and its index (position before removal).

Implementation

Future<void> removeMessage(Message message);