updateMessage method

Future<void> updateMessage(
  1. ChatMessage message
)

Updates the local message.

The message will be updated both in the cache and local database.

Throws A description of the exception. See ChatError.

Implementation

Future<void> updateMessage(ChatMessage message) async {
  Map req = {"message": message.toJson()};
  Map result =
      await ChatChannel.invokeMethod(ChatMethodKeys.updateChatMessage, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}