Flutter
The Vrtx Flutter wrapper allows a Flutter application to launch Vrtx SDK flows from a Dart interface.
The wrapper relies on the native Vrtx iOS and Android SDKs. Regulated wallet flows, onboarding, authentication, compliance controls, and financial operations continue to be handled by the native SDK layer and Vrtx backend.
Official GitHub repository
The Flutter wrapper is available in the official Vrtx GitHub repository: https://github.com/vrtx-fintech/vrtx-flutter
Requirements
The Flutter wrapper requires the native iOS and Android SDK requirements to be met.
Flutter
| Requirement | Version |
|---|---|
| Flutter | 3.10.0+ |
| Dart | 3.0.0+ |
iOS
| Requirement | Version |
|---|---|
| iOS | 15.6+ |
| Xcode | 16+ |
| Swift | 5.9+ |
Set the minimum iOS version in your app’s ios/Podfile:
platform :ios, '15.6'Then run pod install from your ios/ directory.
cd ios
pod installAndroid
| Requirement | Version |
|---|---|
Android minSdk | 29 |
Android compileSdk | 36 |
| Android Gradle Plugin | 8.13 |
| Kotlin | 2.1 |
| JVM target | 17 |
Make sure your Android project can resolve Google and Maven Central artifacts.
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}Public API Contract
The Flutter API mirrors the native SDK public enums.
| Parameter | Enum | Values |
|---|---|---|
environment | Environment | Environment.sandbox, Environment.staging |
language | Language | Language.english, Language.arabic |
mode | Mode | Mode.light, Mode.dark |
externalReference | String | Omit when no external reference is needed |
fontFamily may be passed with the name of a font already bundled in the host app.
import 'package:vrtx_flutter/vrtx_flutter.dart';
try {
await Vrtx.setup(
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
environment: Environment.sandbox,
language: Language.english,
mode: Mode.light,
externalReference: 'YOUR_EXTERNAL_REFERENCE', // omit when no external reference is needed
fontFamily: 'Inter', // omit to use the SDK default per language
);
print('Vrtx screen opened');
} on VrtxError catch (error) {
print('Vrtx error: ${error.status} ${error.message}');
}The externalReference is your own identifier for your SDK user. It can be your users employee_id for instance. It is optional and can be omitted if not used.
Font customization
If your app already bundles a supported font, pass the font family name in fontFamily. The SDK applies the font where supported.
Result
The Flutter wrapper uses normal Dart async behavior.
| Result | Dart Behavior |
|---|---|
| Success | Vrtx.setup(...) completes normally |
| Error | Vrtx.setup(...) throws a VrtxError |
VrtxError contains a native status code and a human-readable message.
Best practice
Wrap Vrtx.setup in a try/catch block so your app can handle setup, authentication, or launch errors clearly.
How It Works
Install Package
Add the Vrtx Flutter package to your app.
Configure App
Pass your client credentials, environment, language, and display mode.
Launch SDK
Call Vrtx.setup from your Flutter app.
Handle Result
Continue on success or catch VrtxError if setup fails.
Installation
Add vrtx_flutter to your pubspec.yaml.
dependencies:
vrtx_flutter:
path: ./vrtx-flutterThen install dependencies.
flutter pub getQuick Start
Import the package and call Vrtx.setup.
import 'package:vrtx_flutter/vrtx_flutter.dart';
try {
await Vrtx.setup(
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
environment: Environment.sandbox,
language: Language.english,
mode: Mode.light,
);
print('Vrtx screen opened');
} on VrtxError catch (error) {
print('Vrtx error: ${error.status} ${error.message}');
}Security note
Never hard-code clientSecret or real production credentials in source control.
Native Layer
The Flutter wrapper bridges into the native Vrtx SDKs.
iOS SDK
Review iOS requirements, framework setup, Info.plist, Nafath, Face ID, and NFC configuration.
Android SDK
Review Android requirements, Maven Central setup, Gradle dependency, and Kotlin configuration.
Native setup still applies
Because this package wraps the native SDKs, the host app must still satisfy the required iOS and Android setup for the flows it enables.
Support
For credentials, license keys, or integration support, contact your Vrtx account manager or email support@vrtx.sa.