Skip to main content

Installation

To set up the Unico SDK for Flutter, follow the steps below:

Step 1 — Add the package via Flutter CLI

Run the following command using the Flutter CLI:

flutter pub add unico_check

This command adds the following line to the pubspec.yaml of your package:

pubspec.yaml
dependencies:
unico_check: ^2.0.2
Manual fetch

flutter pub add unico_check implicitly runs flutter pub get. If the package is not installed correctly, ensure that unico_check is listed in pubspec.yaml and run flutter pub get manually.

Step 2 — Set Android minimum SDK version

The SDK requires Android 5.0 (API 21) or higher. In your android/app/build.gradle, ensure minSdkVersion is set accordingly:

android/app/build.gradle
android {
defaultConfig {
minSdkVersion 21
}
}
Step 3 — Add iOS camera permission

Add the camera usage description to your ios/Runner/Info.plist:

ios/Runner/Info.plist
<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>
Step 4 — Import the package

Import the package into your Dart code:

main.dart
import 'package:unico_check/unico_check.dart';