setCustomFCMRing method

  1. @override
Future<TencentCloudChatPushResult> setCustomFCMRing({
  1. required String channelId,
  2. required String ringName,
  3. required bool enable,
})
override

Implementation

@override
Future<TencentCloudChatPushResult> setCustomFCMRing({
  required String channelId,
  required String ringName,
  required bool enable,
}) async {
  try {
    await _methodChannel.invokeMethod("setCustomFCMRing", {
      "fcm_push_channel_id": channelId,
      "private_ring_name": ringName,
      "enable_fcm_private_ring": enable.toString(),
    });
    return TencentCloudChatPushResult(code: 0);
  } on PlatformException catch (e) {
    return TencentCloudChatPushResult(
      code: int.tryParse(e.code) ?? -1,
      errorMessage: e.message,
    );
  }
}