setConversationMark method

Future<Map> setConversationMark(
  1. int markType,
  2. bool enable,
  3. dynamic conversationInfos
)

Implementation

Future<Map<dynamic, dynamic>> setConversationMark(
    int markType, bool enable, dynamic conversationInfos) async {
  List<Object> jsInfos = [];
  for (Map info in conversationInfos) {
    jsInfos.add(mapToJSObj(info));
  }

  final result = await promiseToFuture(
          ZIM.getInstance()!.setConversationMark(markType, enable, jsInfos))
      .catchError((e) {
    throw PlatformException(code: e.code.toString(), message: e.message);
  });

  final resultMap = jsObjectToMap(result);
  return resultMap;
}