createNotificationChannel method
Implementation
@override
Future<TencentCloudChatPushResult> createNotificationChannel({
required String channelID,
required String channelName,
String? channelDesc,
String? channelSound,
}) async {
try {
await _methodChannel.invokeMethod("createNotificationChannel", {
"channel_id": channelID,
"channel_name": channelName,
"channel_desc": (channelDesc ?? ""),
"channel_sound": (channelSound ?? ""),
});
return TencentCloudChatPushResult(code: 0);
} on PlatformException catch (e) {
return TencentCloudChatPushResult(
code: int.tryParse(e.code) ?? -1,
errorMessage: e.message,
);
}
}