insertMessageToLocalDB method

Future<Map> insertMessageToLocalDB(
  1. dynamic message,
  2. int messageID,
  3. String conversationID,
  4. dynamic conversationType,
  5. 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(handleError);

  return jsObjectToMap(result);
}