addChannel method
- String channelPublicId
KO: 카카오톡 채널 친구 추가하기
channelPublicId
에 카카오톡 채널 프로필 ID 전달
EN: Add Kakao Talk Channel
Pass Kakao Talk Channel profile ID to channelPublicId
Implementation
Future addChannel(final String channelPublicId) async {
if (!await isKakaoTalkInstalled()) {
throw KakaoClientException(
ClientErrorCause.notSupported,
"KakaoTalk is not installed",
);
}
final scheme = isAndroid()
? KakaoSdk.platforms.android.talkChannelScheme
: KakaoSdk.platforms.ios.talkChannelScheme;
if (!kIsWeb || isMobileWeb()) {
await _validate('/sdk/channel/add', channelPublicId);
}
await _channel.invokeMethod('addChannel', {
'channel_scheme': scheme,
'channel_public_id': channelPublicId,
});
}