lapisekyc

Last updated:

0 purchases

lapisekyc Image
lapisekyc Images
Add to Cart

Description:

lapisekyc

How to use the lapiskyc flutter package #
- Using package from file #
Preparing assets #
Copy the assets folder inside the flutter package to your app root folder

Copy env.production and .env.example from the flutter package to your app root folder

Create .env file with the content of env.example in your root folder

Add the above assets to your pubspec.yaml
copied to clipboard
Adding lapiskyc package #
Clone the package or place the package folder in the desired location
Add the package to your pubspec.yaml under dependencies as shown below (the below path is if the package and your app are at the same level of folder structure, replaced with the path of your package location). Change the path to the folder name and location you places the package
copied to clipboard
- Using published package #

Method 1

If you are using vs code add lapisekyc: ^0.0.4 under dependencies in side your pubspec.yaml file and save the file vs code with automatically download the package for you
copied to clipboard

Method 2

Inside your project run the following command to add the package
flutter pub add lapisekyc
copied to clipboard
- Common configurations #

Configurations

Go to android/app/build.gradle and add minSdkVersion 21
and targetSdkVersion 33 under defaultConfig as shown below.


Next add internet permission. Navigate to android/src/main/AndroidManifest.xml and add internet access permission <uses-permission android:name="android.permission.INTERNET"/> as shown below.
copied to clipboard
- Importing and usage #
Import the package like so
import 'package:lapisekyc/lapisekyc.dart';

To initialize the package, call the LapisKyc() class. This class has 2 optional parameters: routeContext and onSuccess.

routeContext: With this parameter you pass your app context so that the package can navigate back to your application after a successful verification.

onSuccess: With this parameter you pass a function that initializes the page you want to be displayed after successful verification. The package will pass users ID card information through this function. Your function argument type should be Map<String, dynamic>. The returned data will have the below structure. Note that all fields may not be returned every time depending on what was possible to extract from the ID card.
{
"documentNumber": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"age": 25,
"dob": "1998/02/15",
"dob_day": 15,
"dob_month": 2,
"dob_year": 1998,
"expiry": "2024/03/15",
"expiry_day": 15,
"expiry_month": 3,
"expiry_year": 2024,
"daysToExpiry": 234,
"issued": "2021/07/07",
"issued_day": 7,
"issued_month": 7,
"issued_year": 2021,
"daysFromIssue": 749,
"address1": "address",
"documentType": "D",
"documentSide": "DUAL",
"issueAuthority": "東京都",
"issuerOrg_full": "Japan",
"issuerOrg_iso2": "JP",
"issuerOrg_iso3": "JPN",
"nationality_full": "Japan",
"nationality_iso2": "JP",
"nationality_iso3": "JPN",
"internalId": "674"
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.