unpinMessage method
Implementation
Future<void> unpinMessage(Message message) async {
try {
await ChatUIKit.instance.unpinMessage(messageId: message.msgId);
List<Message> pinedMessagesList = pinedMessages.value;
int index = pinedMessagesList
.indexWhere((element) => element.msgId == message.msgId);
if (index != -1) {
pinedMessagesList.removeAt(index);
pinedMessages.value = pinedMessagesList;
}
} catch (e) {
debugPrint('unpinMessage: $e');
}
}