WEPIN Developer Documentation
WepinBlogContact
English
English
  • Get Started
    • Introduction
  • Wepin
    • Features
    • Architecture
      • Key Generation
      • Signing
      • Key Backup
    • Workspace
      • App Registration and Key Issuance
      • Networks and Assets Addition
      • Widget Design
    • Supported blockchains
    • Account Abstraction
  • login
    • Overview
    • Social Login Auth Providers
      • Email/Password
      • Google
      • Apple
      • Discord
      • Naver
      • Facebook
      • Line
      • Kakao
    • User Interface
    • Simplified Login
    • Resource
  • Widget Integration
    • Prerequisites
    • Web: JavaScript SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
      • Widget
        • Installation
        • Initialization
        • Methods
        • Final Review
      • Provider
        • Ethereum Provider
        • Kaia Provider
        • Solana Provider
        • Wagmi Connector
      • Wallet Adapter
        • Solana Wallet Adapter
    • Android: Java & Kotlin SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
      • Widget Library
        • Installation
        • Initialization
        • Methods
    • iOS: Swift SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
      • Widget Library
        • installation
        • initialization
        • Methods
    • Flutter SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • Widget
        • Installation
        • Initialization
        • Methods
        • Final Review
      • PIN Pad Library
        • Installation
        • Initialization
        • Methods
    • React Native SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
    • Unity SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • Compose Multiplatform SDK
      • Login Library
        • Installation
        • Initialization
        • Methods
      • Widget
        • Installation
        • Initialization
        • Methods
        • Final Review
  • API
    • Overview
    • Registration
    • Login
    • Wallet
    • Token and NFT
    • Transaction
  • Deprecated
    • Web: JavaScript SDK
      • SDK
        • Installation
        • Initialization
        • Methods
        • Final Review
      • Provider
        • EVM-Compatible Networks
      • Wagmi Connector
    • Android: Java & Kotlin SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • iOS: Swift SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • Flutter SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
    • React Native SDK
      • Installation
      • Initialization
      • Methods
      • Final Review
      • Providers
        • Ethereum Providers
  • MISC
    • Logo & Brand
Powered by GitBook
On this page
  • Import SDK
  • Creating and Initializing the WepinLoginInstance
  • Checking Initialization Status (isInitialized)

Was this helpful?

  1. Widget Integration
  2. Flutter SDK
  3. Login Library

Initialization

This guide explains how to initialize the Wepin Flutter Login Library.

PreviousInstallationNextMethods

Last updated 6 months ago

Was this helpful?

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:

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 WepinLoginInstance

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

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:

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

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

if (wepinLogin.isInitialized()) {
    // Success to initialize WepinLogin
}
App Registration