insertMessageToLocalDB method
Future<Map>
insertMessageToLocalDB(
- dynamic message,
- int messageID,
- String conversationID,
- dynamic conversationType,
- String senderUserID,
)
Implementation
Future<Map<dynamic, dynamic>> insertMessageToLocalDB(
dynamic message,
int messageID,
String conversationID,
dynamic conversationType,
String senderUserID) async {
Object _message = mapToJSObj(message);
final result = await promiseToFuture(ZIM
.getInstance()!
.insertMessageToLocalDB(
_message, conversationID, conversationType, senderUserID))
.catchError((e) {
throw PlatformException(code: e.code.toString(), message: e.message);
});
Map resultMap = jsObjectToMap(result);
return resultMap;
}