> For the complete documentation index, see [llms.txt](https://docs.wepin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wepin.io/en/widget-integration/flutter-sdk/login-library/initialization.md).

# Initialization

After installing the Wepin Flutter Login Library, the next step is to initialize the SDK. SDK initialization involves creating an instance of `WepinLogin` and using the `init()` function to proceed.

## **Import SDK**

To use the Wepin Flutter Login Library, you first need to import the SDK. Add the following import statements:

```dart
import 'package:wepin_flutter_login_lib/wepin_flutter_login_lib.dart';
import 'package:wepin_flutter_login_lib/type/wepin_flutter_login_lib_type.dart';
```

## **Creating and Initializing the `WepinLogin`Instance**

Before creating an instance of `WepinLogin`, you must register your app's Android/iOS information in the Wepin Workspace.

{% content-ref url="/pages/jbQ0WaKQeMfxsY4nDVeP" %}
[App Registration](/en/archive/getstarted/registration.md)
{% endcontent-ref %}

Using the registered app information, create an instance of `WepinLogin`. In the `state init` stage of the `main.dart` file, create and initialize the `WepinLogin` instance as follows:

{% code title="main.dart" %}

```dart
WepinLogin wepinLogin = WepinLogin(
    wepinAppKey: wepinAppKey, 
    wepinAppId: wepinAppId
);
await wepinLogin.init();
```

{% endcode %}

## **Checking Initialization Status (isInitialized)**

You can check whether the `WepinLogin` instance has been successfully initialized by using the `isInitialized` method.

The return value is as follows:

* **bool**
  * Returns `true` if initialization was successful, and `false` if it failed.

#### **Example**

```dart
if (wepinLogin.isInitialized()) {
    // Success to initialize WepinLogin
}
```
