# 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);
```
