isKakaoTalkInstalled function

Future<bool> isKakaoTalkInstalled()

KO: 카카오톡 앱 실행 가능 여부 조회
EN: Returns whether Kakao Talk is available to launch

Implementation

Future<bool> isKakaoTalkInstalled() async {
  var arguments = {};
  if (kIsWeb) {
    // web does not support platform. so I divided the branch
  } else if (_platform.isAndroid) {
    arguments
        .addAll({'talkPackageName': KakaoSdk.platforms.android.talkPackage});
  } else if (_platform.isIOS) {
    arguments.addAll({'loginScheme': KakaoSdk.platforms.ios.talkLoginScheme});
  }
  return await _methodChannel.invokeMethod<bool>(
          CommonConstants.isKakaoTalkInstalled, arguments) ??
      false;
}