updateMessage method Null safety

Future<void> updateMessage(
  1. EMMessage message
)

Updates the local message.

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

Throws A description of the exception. See {@link EMError}.

Implementation

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