setOfflinePushConfig method

  1. @override
Future<V2TimCallback> setOfflinePushConfig({
  1. required double businessID,
  2. required String token,
  3. bool isTPNSToken = false,
  4. bool isVoip = false,
})
override

Implementation

@override
Future<V2TimCallback> setOfflinePushConfig({
  required double businessID,
  required String token,
  bool isTPNSToken = false,
  bool isVoip = false,
}) async {
  Map<String, dynamic> param = {
    "ability": Utils.getAbility(),
    "businessID": businessID,
    "token": token,
    "isTPNSToken": isTPNSToken,
  };
  var resp = V2TimCallback.fromJson(
    formatJson(
      await _channel.invokeMethod(
        Platform.isIOS ? (isVoip ? "setVOIP" : "setAPNS") : "setOfflinePushConfig",
        buildOfflinePushParam(
          param,
        ),
      ),
    ),
  );
  log(Platform.isIOS ? (isVoip ? "setVOIP" : "setAPNS") : "setOfflinePushConfig", param, resp.toLogString());
  return resp;
}