Flutter
This is a walkthrough of how you can itegrate the Oboarding or Authenticate SDK for Flutter applications.
Getting started
In order to perform an Onboarding or an Authenticate, you should follow those steps:
1. Integrate the SDK
The Flutter SDK supports:
Dart 3.0.0 or higher
Flutter 3.0.0 or higher
Android API level 24+
Kotlin 1.8.0 or higher
IOS 15.0 or higher
Targeted Device Families = iPhone, iPad
Mandatory app permision for iOS
The SDK uses the device's camera functionality.
You must add NSCameraUsageDescription
within your application's Info.plist
file (see Apple documentation).
Installing SDK
Run this command with Flutter:
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Then import the SDK, in your Dart code, you can use:
2. Get a token
Use the credentials you received from ShareID's team to get an authenticate token and launch an onboarding or authenticate workflow.
Depending on the SDK you are integrating (Onboarding/Authenticate), you may use an API here Get a Token
3. Start an onboarding or authenticate flow
Use your token to start an onboarding or an authenticate, you can configure the SDK :
For more informations : Example File
For authenticate:
For more informations : Example File
The table below describes the list of parameters:
4. Get the user workflow result from SDK (Message Handling)
In order to retrieve ShareID results from the flow, you can json.decode the result and use the class MessageHandler to retrieve the different result.
5. Get the Analysis result
When the processing of an onboarding request is finished, you may receive the result through the callback if you provided it. You may also, fetch yourself the result by calling our API.
See Fetch result for more details.
Last updated