blusalt_identity_verification 0.0.1
blusalt_identity_verification: ^0.0.1 copied to clipboard

A new Flutter package project.

blusalt_identity #

Dart CI

Blusalt Flutter package for accessing Blusalt Identity Verification Services

Developers Preview Status #

The Package is a pre-release , all issues should be logged in Issues.

Usage #

To use this plugin, add blusalt_identity_plugin as a dependency in your pubspec.yaml file.

Getting Started #

import 'package:blusalt_identity/network/blusalt_sdk.dart';
import 'package:blusalt_identity/network/network_client.dart';

//Obtain credentials from blusalt.net
//Set working environment
//1. Environment.test_debug
//2. Environment.test
//3. Environment.prod
//List of Available services
//1. BVN
//2. BVN with Image
//3. NIN
//4. NIN By Phone
//5. Dirvers Licence(DL)
//6. Permanent Voter's Card(PVC)
//7. Facial Comparison
ApiCredentials credentials =
    ApiCredentials(apiKey: "APIKEY", clientID: "CLIENTID", appName: "test-sersvices");
    BlusaltSDK.initializeSDK(credentials, env: Environment.prod);

Sample Usage #

import 'package:blusalt_identity/network/blusalt_sdk.dart';
import 'package:blusalt_identity/network/network_client.dart';
import 'package:blusalt_identity/verification_manager.dart' as manager;

///
void verifyBVN() async {
    try {
      BVNRequest bvnRequest = BVNRequest(bvnNumber: "22169344973");
      var response = await manager.verifyBVN(bvnRequest);
      print(response.results!.bvnNumber);
    }
    catch(e){
      print(e);
    }
  }

  void verifyNIN() async {
    try {
      NINRequest ninRequest = NINRequest(ninNumber: "22169344973", phoneNumber: "");
      var response = await manager.verifyNIN(ninRequest);
      print(response.results!.documentNo);
    }
    catch(e){
      print(e);
    }
  }

  void verifyBVNWithImage() async {
    try {
      IBVNRequest bvnRequest = IBVNRequest(bvnNumber: "12345678");
      var response = await manager.verifyBVNWithImage(bvnRequest);
      print(response.results!.personalInfo);
    }
    catch(e){
      print(e);
    }
  }