aerosync_flutter_sdk 2.0.0-rc.3
aerosync_flutter_sdk: ^2.0.0-rc.3 copied to clipboard
This Flutter SDK provides an interface to load Aerosync-UI in Flutter apps.
AeroSync Flutter SDK #
A Flutter SDK that provides secure bank account linking capabilities for mobile applications. Integrate AeroSync's bank connection widget into your Flutter app with ease, allowing users to securely connect their bank accounts through their bank's website with fast, secure, and tokenized connections.
Features #
- AeroSyncWidget: Full bank linking experience with complete UI
- AeroSyncEmbeddedView: Lightweight bank search and selection interface
- Seamless Integration: Automatic transition from embedded view to full widget
- Cross-Platform: Works on iOS, Android, and Web
- State Management: Maintains session state across different views
- Secure: All communications are encrypted and tokenized
- MFA Support: Multi-factor authentication handling
- Deep Linking: OAuth authentication support with external browser
- Customizable: Theming and styling options
Requirements #
- Flutter 3.0.0+
- Dart 2.17.0+
- iOS 11.0+ / Android API level 21+
Installation #
1. Add Dependency #
Add aerosync_flutter_sdk
to your pubspec.yaml
file:
dependencies:
aerosync_flutter_sdk: ^2.0.0
2. Install Dependencies #
flutter pub get
3. Import the Library #
import 'package:aerosync_flutter_sdk/aerosync_flutter_sdk.dart';
Usage Examples #
1. AeroSyncWidget (Full Bank Linking Experience) #
The main widget provides a complete bank linking experience:
import 'package:flutter/material.dart';
import 'package:aerosync_flutter_sdk/aerosync_flutter_sdk.dart';
class BankLinkingPage extends StatefulWidget {
@override
_BankLinkingPageState createState() {
return _BankLinkingPageState();
}
}
class _BankLinkingPageState extends State<BankLinkingPage> {
final String _token = "your-token-here";
final String _environment = "sandbox"; // dev, staging, sandbox, production
final String _deeplink = "yourapp://";
void _handleSuccess(dynamic data) {
print('Bank linking successful: $data');
// Handle successful bank connection
Navigator.pop(context);
}
void _handleClose(dynamic data) {
print('Widget closed: $data');
Navigator.pop(context);
}
void _handleEvent(dynamic data) {
print('Event received: $data');
}
void _handleError(dynamic data) {
print('Error occurred: $data');
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Error: $data')),
);
}
void _handleLoad(dynamic data) {
print('Widget loaded: $data');
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Link Your Bank Account')),
body: AeroSyncWidget(
token: _token,
environment: _environment,
deeplink: _deeplink,
aeroPassUserUuid: 'user-uuid-123', // Required
configurationId: 'your-config-id', // Optional
theme: 'light', // 'light' or 'dark'
style: {
'width': '350',
'height': '688',
'bgColor': '#FFFFFF',
},
manualLinkOnly: false,
handleMFA: false,
onSuccess: _handleSuccess,
onClose: _handleClose,
onEvent: _handleEvent,
onError: _handleError,
onLoad: _handleLoad,
),
);
}
}
2. AeroSyncEmbeddedView (Bank Search Interface) #
The embedded view provides a lightweight bank search and selection interface:
import 'package:flutter/material.dart';
import 'package:aerosync_flutter_sdk/aerosync_flutter_sdk.dart';
class BankSearchPage extends StatefulWidget {
@override
_BankSearchPageState createState() {
return _BankSearchPageState();
}
}
class _BankSearchPageState extends State<BankSearchPage> {
final String _token = "your-token-here";
final String _environment = "sandbox";
final String _deeplink = "yourapp://";
void _handleLoad(dynamic data) {
print('Embedded view loaded: $data');
}
void _handleBankClick(Map data) {
print('Bank selected: $data');
// Extract stateCode from the bank selection
final stateCode = data['stateCode'] as String?;
if (stateCode != null) {
// Navigate to full widget with stateCode to continue the flow
Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return BankLinkingPage(
initialStateCode: stateCode,
token: _token,
environment: _environment,
deeplink: _deeplink,
);
},
),
);
}
}
void _handleError(String error) {
print('Embedded view error: $error');
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Error: $error')),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Search Banks')),
body: AeroSyncEmbeddedView(
token: _token,
environment: _environment,
deeplink: _deeplink,
configurationId: 'your-config-id', // Optional
theme: 'light', // 'light' or 'dark'
onLoad: _handleLoad,
onBankClick: _handleBankClick,
onError: _handleError,
),
);
}
}
3. MFA (Multi-Factor Authentication) Handling #
For advanced use cases requiring MFA handling:
AeroSyncWidget(
token: _token,
environment: _environment,
deeplink: _deeplink,
aeroPassUserUuid: 'user-uuid-123',
handleMFA: true,
jobId: 'your-job-id',
connectionId: 'your-connection-id',
onSuccess: _handleSuccess,
onClose: _handleClose,
onEvent: _handleEvent,
onError: _handleError,
onLoad: _handleLoad,
)
API Reference #
To generate a token, check out our integration guide here.
AeroSyncWidget Parameters #
Parameter | Type | Required | Description |
---|---|---|---|
token |
String | Yes | Authentication token for the session |
environment |
String | Yes | Environment: "dev", "staging", "sandbox", "production" |
deeplink |
String | Yes | Deep link URL for your app |
configurationId |
String? | No | Configuration ID for customization |
stateCode |
String? | No | State code for continuing from embedded view |
aeroPassUserUuid |
String | Yes | AeroPass user UUID |
handleMFA |
bool | No | Whether to handle MFA flows (default: false) |
manualLinkOnly |
bool | No | Whether to show only manual linking options (default: false) |
jobId |
String? | No | Job ID for MFA handling |
connectionId |
String? | No | Connection ID for MFA handling |
theme |
String | No | UI theme: "light" or "dark" (default: "light") |
style |
Map | No | Custom styling options (width, height, bgColor) |
AeroSyncEmbeddedView Parameters #
Parameter | Type | Required | Description |
---|---|---|---|
token |
String | Yes | Authentication token for the session |
environment |
String | Yes | Environment: "dev", "staging", "sandbox", "production" |
deeplink |
String | Yes | Deep link URL for your app |
configurationId |
String? | No | Configuration ID for customization |
theme |
String | No | UI theme: "light" or "dark" (default: "light") |
Callback Events #
AeroSyncWidget Events
- onEvent: General widget events and page navigation
- onSuccess: Successful bank connection with account details
- onClose: Widget closed by user
- onLoad: Widget finished loading
- onError: Error occurred during the process
AeroSyncEmbeddedView Events
- onLoad: Embedded view finished loading
- onBankClick: User selected a bank (contains stateCode for widget launch)
- onError: Error occurred in embedded view
Deep Linking Setup #
The deeplink parameter is required for optimal OAuth authentication experience with major financial institutions.
To implement deep linking in Flutter, refer to the official Flutter Deep Linking guide here.
Success Response Format #
Store onSuccess()
data attributes to authenticate with the Aerosync API:
{
"type": "pageSuccess",
"payload": {
"user_id": "a08905dae1d74c9ea021d325d8de654f",
"user_password": "7f9946f5e2e34f61a59f2f3c00535118",
"ClientName": "Aeropay",
"FILoginAcctId": 113786059
}
}
Platform-Specific Setup #
iOS Setup #
- Ensure iOS deployment target is 11.0 or higher
- Run
cd ios && pod install
if using CocoaPods
Android Setup #
- Minimum SDK version: 21
- Add internet permission to
android/app/src/main/AndroidManifest.xml
:<uses-permission android:name="android.permission.INTERNET" />
Troubleshooting #
Common Issues #
- Widget not loading: Verify your token is valid and not expired
- Embedded view not responding: Check that the environment is correctly set
- Build errors: Run
flutter clean
andflutter pub get
- iOS build issues: Check iOS deployment target and run
pod install
Support #
For technical support and questions, please contact our development team.
License #
This SDK is proprietary software. Please refer to your license agreement for usage terms.