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

RequirementVersion
Flutter3.10.0+
Dart3.0.0+

iOS

RequirementVersion
iOS15.6+
Xcode16+
Swift5.9+

Set the minimum iOS version in your app’s ios/Podfile:

ruby
platform :ios, '15.6'

Then run pod install from your ios/ directory.

bash
cd ios
pod install

Android

RequirementVersion
Android minSdk29
Android compileSdk36
Android Gradle Plugin8.13
Kotlin2.1
JVM target17

Make sure your Android project can resolve Google and Maven Central artifacts.

kotlin
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

Public API Contract

The Flutter API mirrors the native SDK public enums.

ParameterEnumValues
environmentEnvironmentEnvironment.sandbox, Environment.staging
languageLanguageLanguage.english, Language.arabic
modeModeMode.light, Mode.dark
externalReferenceStringOmit when no external reference is needed

fontFamily may be passed with the name of a font already bundled in the host app.

dart
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.

ResultDart Behavior
SuccessVrtx.setup(...) completes normally
ErrorVrtx.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

1

Install Package

Add the Vrtx Flutter package to your app.

2

Configure App

Pass your client credentials, environment, language, and display mode.

3

Launch SDK

Call Vrtx.setup from your Flutter app.

4

Handle Result

Continue on success or catch VrtxError if setup fails.

Installation

Add vrtx_flutter to your pubspec.yaml.

yaml
dependencies:
  vrtx_flutter:
    path: ./vrtx-flutter

Then install dependencies.

bash
flutter pub get

Quick Start

Import the package and call Vrtx.setup.

dart
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.

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.