LogoLogo
  • Welcome!
  • GETTING STARTED
    • Signing Up
    • Choose a Product
    • Choose an Integration Option
    • Run Your First Test Job
    • Complete Your KYC
    • Fund Your Wallet
    • Go Live!
    • Pricing
  • SUPPORTED ID TYPES & DOCUMENTS
    • For Individuals (KYC)
      • Using ID Number
        • Supported Countries
          • Côte d'Ivoire
            • National ID (without Photo)
            • Resident ID (without Photo)
          • Ghana
            • Ghana Card
            • Ghana Card (without Photo)
            • Passport
            • Voter's ID
          • Kenya
            • Alien Card
            • KRA Pin
            • National ID
            • National ID (without Photo)
            • Passport
            • Tax Information
          • Nigeria
            • Bank Account
            • BVN
            • NIN V2
            • NIN Slip Verification
            • V_NIN (Virtual NIN)
            • Phone Number
            • Voter's ID
          • South Africa
            • National ID
            • National ID (without Photo)
            • Phone Number
            • Refugee and Asylum ID
          • Uganda
            • National ID (without Photo)
            • Basic KYC in Uganda
          • Zambia
            • Bank Account
            • TPIN
          • Zimbabwe
            • National ID (without Photo)
        • Test Data
          • Customising Sandbox Test Data
        • ID Number Regex
        • Visual Samples of Supported ID Types
      • Using Document Image
        • Continents
          • Africa
          • Asia and the Middle East
          • Europe
          • North America
          • Oceania
          • South America
    • For Businesses (KYB)
      • Supported Countries
        • Nigeria
          • Business Registration
          • Tax Information
        • Kenya
          • Business Registration
        • South Africa
          • Business Registration
      • ID Number Regex
  • PRODUCTS
    • For Individuals (KYC)
      • AML Check
        • AML News Media
      • Basic KYC
      • Biometric KYC
      • Digital Address Verification
      • Document Verification
        • Document Verification
        • Enhanced Document Verification
      • Electronic Signature
      • Enhanced KYC
      • Phone Number Verification
      • SmartSelfie™ Authentication
      • SmartSelfie™ Compare
      • Smile Secure
    • For Businesses (KYB)
      • Business Verification
  • Integration Options
    • Mobile
      • Getting Started
      • Products
        • Biometric KYC
        • BVN Consent
        • Document Verification
        • Enhanced Document Verification
        • Enhanced KYC
        • SmartSelfie™ Enrollment and Authentication
        • Enhanced SmartSelfie™ Enrollment And Authentication
      • Customization
        • UI Components
      • Offline Mode
      • Release Notes
        • Android Release Notes
        • iOS Release Notes
        • Flutter Release Notes
        • React Native Release Notes
    • No-Code
      • Smile Links
        • Link FAQs
        • Rest API
    • Server to Server
      • Ruby
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • KYB - Business Verification
          • AML Check
        • Generate Token for Web Integration
        • Utilities
      • Python
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • Java
        • Release Notes
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
      • Node.js
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • Enhanced Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • PHP
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
    • Rest API
      • Signing your API Request
        • Using Signature
      • Products
      • Postman Collection
      • Utilities
    • Web / Mobile Web
      • Web Integration
        • Installation
        • Usage
        • End User Consent
        • Support
      • Javascript SDK
        • Installation
        • Usage
        • Migration
        • Deprecated Version
          • Installation
          • Usage
          • Notes
          • Support
  • FURTHER READING
    • FAQs
      • What are your support hours?
      • How do I set up a callback?
      • How to re-enroll, deactivate or delete a user?
      • Add or remove team members
      • What are top-level keys?
      • What are partner_params?
      • How do job types map to the new product names?
      • Is there an API I can use to monitor my wallet balance?
      • Is there an API I can query to check the availability status of an ID type?
      • How do I integrate Smile ID in other countries or query other ID types?
      • What are the image types I can upload to Smile ID?
      • Why aren't Kenyan IDs returning images for some IDs queried?
      • Why are some of my bank verification requests returning 'ID authority unavailable'?
      • How can I look up a specific user's data?
      • Selfie best-practices
      • Document capture best-practices
      • What happens under the hood?
      • Guide to the user consent screen
      • What is code 2302?
      • Using the Demo App and Scanning QR codes
    • Job status
    • KYC receipts
    • Result codes
      • Error codes
    • Securing your account with two-factor authentication (2FA)
    • Security Overview
    • Troubleshooting
      • Troubleshooting error 2204 & 2205 - "You're not authorized to do that"
      • Why is my Web API job taking so long?
      • Image capture issues on web client
Powered by GitBook
On this page
  • ID Card Capture
  • Import the library
  • Capture ID Card
  • Get Results
  • Optional Permissions
  • Optional UI Customisations
  • Basic Example

Was this helpful?

  1. Integration Options
  2. Mobile
  3. Flutter (deprecated)

ID Card Capture

ID Card Capture will capture an id card image for a tag that may be provided during initiation and if not provided this will be auto generated by the SDK and returned with a code.

Last updated 11 months ago

Was this helpful?

ID Card Capture

ID Card Capture will capture an id card image for a tag that may be provided during initiation and if not provided this will be auto generated by the SDK and returned with a code.

Import the library

import 'package:smile_flutter/smile_flutter.dart';

Capture ID Card

If you want the SDK to generate a tag for you then call the method with an empty string

 var result = await SmileFlutter.captureIDCard("") ;

If you want the generate to use a custom tag send a string to the SDK with alphanumeric characters with the exception of an underscore and no spacing in them.

var result = await SmileFlutter.captureIDCard(<STRING_TAG>);

This will present a screen as belowID Card Capture

Get Results

The selfie capture process is an asynchronous process and will return an error code and a tag once done. The result looks as the below

    var resultCode = result!["SID_RESULT_CODE"];
    var resultTag = result["SID_RESULT_TAG"];

If the result code is -1 AND the tag is not null or empty then the selfie capture was successful.

Optional Permissions

By default the SDK will request for permissions on it's own particularly on android and the first instance the call to the captureSelfie may fail and will definately fail if the user has not allowed the permissions for camera

It is advisable to then do permissions request prior to calling the captureSelfie method to make sure you handle permissions and perhaps even check for permissions before in that case then the call should be

var result = await SmileFlutter.captureIDCard("", HashMap<String, String>(),false)

The false will mean the SDK will try to open the selfie capture and assume permission handling has already been done

Optional UI Customisations

For basic UI customisation, an additional key-value Hashmap needs to be passed as second parameter when performing a call to the library's captureSelfie("<TAG>",HashMap<String, String>(),false)

) method, where tag is a string and config the added key-value Map containing the desired settings.

var config = HashMap<String, String>();
config["capture_title_text"] = "Capturing your smile..."";
var result = await SmileFlutter.captureSelfie("", config) ?? null;

Basic Example

  • id_capture_side: a string value with options 0,1,2 0 being capture front only, 1 being capture front and back and 2 being capture back only

  • id_capture_orientation: a string that determines the prompt text view on the selfie review screen; this text view refers to the one directly under the selfie image view

var config = HashMap<String, String>();
config["id_capture_side"] = "0";
config["id_capture_orientation"] = "2";
var result = await SmileFlutter.captureIDCard("test_tag",config) ?? null;

\