> 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/installation.md).

# Installation

**Requirements**

* **Android:** API version <mark style="color:blue;">**21**</mark> or higher
* **iOS:** Version <mark style="color:blue;">**13.0**</mark> or higher
  * Update the `platform :ios` version to <mark style="color:blue;">**13.0**</mark> in your Flutter project’s `ios/Podfile`, and verify and modify the `ios/Podfile` as needed.

{% hint style="info" %}
This package is only available for **Android** and **iOS** environments. It is not supported on **Web**, **macOS**, **Windows**, or **Linux** environments.
{% endhint %}

## **Installation**

The Wepin Flutter Login Library is published on pub.dev, and you can install it by adding the following command or by adding a dependency in your app's `pubspec.yaml`.

* **Add using Flutter pub add command:**

```bash
$ flutter pub add wepin_flutter_login_lib
```

* **Add to dependencies in `pubspec.yaml`:**

```yaml
dependencies:
    wepin_flutter_login_lib: ^0.0.1
```

## Configuration

### **Deep Link Configuration**

To enable OAuth login functionality (`loginWithOauthProvider`), you need to configure the Deep Link scheme.

* **Deep Link scheme format:** `wepin.` + `Wepin App ID`

#### **Android**

* Add `manifestPlaceholders` to the `build.gradle (app)` file to easily capture all redirects using this custom scheme with the Wepin Widget SDK.

{% code title="build.gradle(app)" %}

```gradle
// Deep Link configuration => Redirect scheme format: wepin. + Wepin App ID
android.defaultConfig.manifestPlaceholders = [
  'appAuthRedirectScheme': 'wepin.{{YOUR_WEPIN_APPID}}'
]
```

{% endcode %}

#### **iOS**

* Add the app’s URL scheme to the `Info.plist` file to redirect back to the app after the authentication process.

{% code title="Info.plist" %}

```xml
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>unique name</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>wepin.{{YOUR_WEPIN_APPID}}</string>
        </array>
    </dict>
</array>
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wepin.io/en/widget-integration/flutter-sdk/login-library/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
