# init method Null safety

void init(

1. {String? nativeAppKey,
2. String? javaScriptAppKey,
3. ServerHosts? serviceHosts,
4. bool? loggingEnabled}

)

## Implementation

    static void init({
      String? nativeAppKey,
      String? javaScriptAppKey,
      ServerHosts? serviceHosts,
      bool? loggingEnabled,
    }) {
      if (nativeAppKey == null) {
        throw KakaoClientException("Native App Key is required");
      }

      nativeKey = nativeAppKey;
      jsKey = javaScriptAppKey ?? "";
      hosts = serviceHosts ?? ServerHosts();
      logging = loggingEnabled ?? false;
    }