init static method

void init(
  1. {String? nativeAppKey,
  2. String? javaScriptAppKey,
  3. String? customScheme,
  4. ServerHosts? serviceHosts,
  5. PlatformSupport? platformSupport,
  6. bool? loggingEnabled}
)

내 애플리케이션에서 확인한 앱 키로 Flutter SDK 초기화, 서비스 환경별 앱 키 사용 웹: javaScriptAppKey에 JavaScript 키 전달 앱: nativeAppKey에 네이티브 앱 키 전달

Implementation

static void init({
  String? nativeAppKey,
  String? javaScriptAppKey,
  String? customScheme,
  ServerHosts? serviceHosts,
  PlatformSupport? platformSupport,
  bool? loggingEnabled,
}) {
  if (nativeAppKey == null && javaScriptAppKey == null) {
    throw KakaoClientException(
      ClientErrorCause.badParameter,
      "A Native App Key or JavaScript App Key is required",
    );
  }

  _nativeKey = nativeAppKey ?? "";
  _jsKey = javaScriptAppKey ?? "";
  _customScheme = customScheme ?? "kakao$appKey";
  hosts = serviceHosts ?? ServerHosts();
  platforms = platformSupport ?? PlatformSupport();
  logging = loggingEnabled ?? false;

  if (kIsWeb) {
    _channel.invokeMethod("retrieveAuthCode");
  }
}