setBusID method

  1. @override
Future<TencentCloudChatPushResult> setBusID({
  1. required int busID,
})
override

Implementation

@override
Future<TencentCloudChatPushResult> setBusID({required int busID}) async {
  try {
    if (Platform.isIOS) {
      await _methodChannel.invokeMethod("setBusId", {"busId": busID});
    }
    return TencentCloudChatPushResult(code: 0);
  } on PlatformException catch (e) {
    return TencentCloudChatPushResult(
      code: int.tryParse(e.code) ?? -1,
      errorMessage: e.message,
    );
  }
}