# Installation

## **Requirements**

* **Android:** API version <mark style="color:blue;">**21**</mark> or higher
  * You need to set the `compileSdkVersion` to <mark style="color:blue;">**34**</mark> in the `android/app/build.gradle` file.
* **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 PIN Pad Libary 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_pin_pad
```

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

```yaml
dependencies:
    wepin_flutter_pin_pad: ^0.0.1
```

Once the installation is complete, initialize the WepinPinPad instance using the app ID and app key assigned after registering the app. This will enable the use of WepinPinPad.

```dart
// 1. Package import
import 'package:wepin_flutter_pin_pad/wepin_flutter_pin_pad.dart';
import 'package:wepin_flutter_pin_pad/wepin_flutter_pin_pad_types.dart';

// 2. Instance Initialization 
WepinPinPad wepinPinPad = WepinPinPad(wepinAppKey: wepinAppKey, wepinAppId: wepinAppId);
```


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
