Flutter

The Smile ID flutter SDK only works on native mobile apps and not for mac or web. The wrapper has three main components, Selfie, ID Card and Job submission.

1. INSTALLATION

https://pub.dev/packages/smile_flutter

To use this plugin, add smile_flutter as a dependency in your pubspec.yaml file. You must also configure Smile ID SDK for each platform project: Android and iOS as specified in the below steps

2. Project Setup

Add the Smile ID config file to your app:

  1. If you have not generated your smile id API key please click here to generate an API key (Skip if you have generated an API key before)

  2. Click Download Configuration File to obtain your Smile ID config file (smile_config.json).

  3. For iOS open the ios project and place this file at the root of your project and for android place this file at the root of the main module (usually app folder) this step is critical and your project will behave unexpectedly if these are not done right.

What do you need to know about this config file?

  • The Smile ID config file contains unique, and secret identifiers for your project. Do not share this file with extenal parties

  • You can download your Smile ID config file again at any time.

  • Make sure the config file name is not appended with additional characters, like (2).

  • Do not edit the contents of the config file

The SDK Exposes this methods

//Selfie Capture
static Future<Map<dynamic, dynamic>?> captureSelfie(String tag) async
//ID Card Capture
static Future<Map<dynamic, dynamic>?> captureIDCard(String tag) async
//Capture a Selfie and ID Card in one go
static Future<Map<dynamic, dynamic>?> captureSelfieAndIDCard(
String tag) async
//Submit a job
static Future<Map<dynamic, dynamic>?> submitJob(
String tag,
int jobType,
bool isProduction,
Map<String, String>? partnerParams,
Map<String, String>? idInfo,
Map<String, String>? geoInfo) async