init static method
void
init({})
내 애플리케이션
에서 확인한 앱 키로 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");
}
}