deleteMessage method
Implementation
Future<void> deleteMessage(String messageId) async {
try {
await ChatUIKit.instance.deleteLocalMessageById(
conversationId: profile.id,
type: conversationType,
messageId: messageId,
);
msgModelList.removeWhere((element) => messageId == element.message.msgId);
if (cacheMessages.isNotEmpty) {
msgModelList.insert(0, cacheMessages.first);
cacheMessages.removeAt(0);
}
refresh();
// ignore: empty_catches
} catch (e) {}
}