Flutter
Integrating Verisoul in Flutter Apps
Verisoul provides a Flutter SDK that allows you to implement fraud prevention in your cross-platform mobile applications. This guide covers the installation, configuration, and usage of the Verisoul Flutter SDK.
Installation
1. Add Dependency
Add the Verisoul SDK to your pubspec.yaml
file:
2. Update the Android minimum minSdk
to 24 in android/app/build.gradle
If an exception occurs during the build stating that the ai.verisoul:android
package cannot be downloaded, add the following Maven repository inside your android/build.gradle
file:
Usage
1. Initialization
When this is called Verisoul library will be initialized, initial data together with session ID will be gathered and uploaded to Verisoul backend.
2. Get Session ID
Once the minimum amount of data is gathered the session ID becomes available. The session ID is needed in order to request a risk assessment from Verisoul’s API. Note that session IDs are short lived and will expire after 24 hours. The application can obtain session ID by providing the callback as shown below:
3. Provide Touch Events
Android
1. Provide Touch Events (Android only)
In order to gather touch events and compare them to device accelerometer sensor data, the app will need to provide touch events to Verisoul. you need to Edit th MainActivity
, to override dispatchTouchEvent
function and pass the data to Verisoul like shown below.
iOS
Capabilities
To fully utilize VerisoulSDK, you must add the App Attest
capability to your project. This capability allows the SDK to perform necessary checks and validations to ensure the integrity and security of your application.
Update your app’s entitlements file:
Update the privacy manifest file
Next Steps
- Learn about Backend Integration for API implementation
- See Integration Best Practices
- See Verisoul’s Pub.dev page Flutter SDK
- See the Flutter Sample App for a complete implementation