saafe_aa_sdk 0.1.0 copy "saafe_aa_sdk: ^0.1.0" to clipboard
saafe_aa_sdk: ^0.1.0 copied to clipboard

Flutter SDK for integrating SAAFE's secure authentication and financial experience

Flutter SAAFE SDK #

A Flutter SDK for integrating SAAFE's secure authentication and financial experience into your Flutter applications.

Features #

  • Display SAAFE's secure authentication flow in a modern bottom sheet WebView
  • iOS-like modal transitions with full keyboard handling
  • Gesture controls with swipe-to-dismiss and confirmation dialog
  • Gracefully handles all application states and edge cases
  • Provides callbacks for success, error, load, and cancel events
  • Built-in error handling and recovery mechanisms

Installation #

Add this package to your pubspec.yaml:

dependencies:
  flutter_saafe_sdk: ^0.1.0

Or install it directly from the command line:

flutter pub add flutter_saafe_sdk

Platform Specific Setup #

Android

Ensure your minSdkVersion is at least 19 (Android 4.4) and compileSdkVersion is at least 33 in your android/app/build.gradle:

android {
    compileSdkVersion 33
    defaultConfig {
        minSdkVersion 19
    }
}

iOS

Add the following to your ios/Runner/Info.plist:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

Getting Started #

Initialize the SDK in your app's main function:

import 'package:flutter_saafe_sdk/flutter_saafe_sdk.dart';

void main() {
  // Initialize SAAFE SDK
  SaafeSdk.initialize();
  
  runApp(const MyApp());
}

Then use the SDK to trigger the authentication flow:

void startSaafeFlow() {
  final options = SaafeRedirectOptions(
    fi: 'your_fi_token',
    reqdate: 'your_reqdate',
    ecreq: 'your_encrypted_request',
    onComplete: (data) {
      print('Flow completed: $data');
    },
    onError: (error) {
      print('Error: $error');
    },
    onCancel: () {
      print('Flow cancelled by user');
    },
  );

  final redirectInstance = SaafeSdk.triggerRedirect(context, options);
  
  // You can store the instance to close the flow programmatically later
  // redirectInstance.close(); // This will show a confirmation dialog before closing
}

UI Features #

The SDK provides a modern user experience with:

  • Beautiful bottom sheet modal with rounded corners
  • Proper handling of keyboard presentation
  • Custom close confirmation dialog with modern design
  • Drag handle at the top for intuitive user interaction
  • Absolute positioned close button for easy dismissal
  • Loading indicators while content is loading

Platform Support #

  • ✅ Android (API 19+)
  • ✅ iOS
  • ❌ Web (WebView is not supported on Flutter web)
  • ❌ macOS (WebView is not supported on macOS)
  • ❌ Windows (WebView is not supported on Windows)
  • ❌ Linux (WebView is not supported on Linux)

License #

This package is licensed under the MIT License.

2
likes
0
points
118
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

Flutter SDK for integrating SAAFE's secure authentication and financial experience

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, flutter, url_launcher, webview_flutter

More

Packages that depend on saafe_aa_sdk