SDK Integration

PowerAuth Flutter SDK Dependency

The PowerAuth Flutter SDK is a required dependency that will be automatically installed (if not already specified in your project).

Compatible PowerAuth Mobile Flutter SDK Versions

WMT Version PowerAuth Flutter SDK
2.0.x 2.0.0-beta.1
1.0.x ^1.1.0

Supported Platforms

The library is available for the following Flutter 3.44.0+ platforms:

  • Android 6.0 (API 23) and newer
  • iOS 13.4 and newer

How To Install

1. Prerequisites

  • Flutter SDK installed (Get Started)
  • A working Flutter project (flutter create my_app if starting fresh)

2. Add Dependency

Open pubspec.yaml and add:

dependencies:
  mtoken_sdk_flutter: ^2.0.0-beta.1  # Check pub.dev for latest version

Then run:

flutter pub get

3. Configure Native Platforms

Android

In android/app/build.gradle, make sure to set the minimum SDK version:

compileSdkVersion 37
minSdkVersion 23

Also, make sure to enable Java 17:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
}

iOS

In ios/Podfile, ensure the platform version is at least 13.4:

platform :ios, '13.4'

Then install pods:

cd ios
pod install
cd ..

4. Import in your Dart files

import 'package:mtoken_sdk_flutter/mtoken_sdk_flutter.dart';
import 'package:flutter_powerauth_mobile_sdk_plugin/flutter_powerauth_mobile_sdk_plugin.dart';

Future<void> createMtokenInstance() async {
  final powerAuth = PowerAuth("my-instance");
  // note that an activated PowerAuth instance is required. How to activate the PowerAuth instance, follow https://github.com/wultra/flutter-powerauth-mobile-sdk documentation.

  // Then, use PowerAuth's helper function to create the mtoken instance:
  final mtoken = await powerAuth.createMobileToken();
}
Last updated on Aug 17, 2026 (17:09) Edit on Github Send Feedback

2.0.x

Mobile Token SDK Flutter