getAllReceiveMessageOpt method

Implementation

Future<V2TimValueCallback<V2TimReceiveMessageOptInfo>> getAllReceiveMessageOpt() async {
  if (!TIMManager.instance.isInitSDK()) {
    return V2TimValueCallback<V2TimReceiveMessageOptInfo>(code: TIMErrCode.ERR_SDK_NOT_INITIALIZED.value, desc: "sdk not init");
  }

  String userData = Tools.generateUserData('getAllReceiveMessageOpt');
  Completer<V2TimValueCallback<V2TimReceiveMessageOptInfo>> completer = Completer();
  NativeLibraryManager.timValueCallback2Future(userData, completer);

  Pointer<Void> pUserData = Tools.string2PointerVoid(userData);
  NativeLibraryManager.bindings.DartGetAllReceiveMessageOpt(pUserData);

  return completer.future;
}