plaid_omni_connect 1.0.0
plaid_omni_connect: ^1.0.0 copied to clipboard
Plaid Omni Connect Link integration for Flutter with seamless inline UX across mobile, web, and desktop platforms (iOS, Android, Web, macOS, Windows, Linux).
plaid_omni_connect #
Plaid Omni Connect Link integration for Flutter with seamless inline UX across all platforms: iOS, Android, Web, macOS, Windows, and Linux.
✨ Features #
- 🎯 Seamless inline modal UX - Never leaves your app
- 📱 Universal platform support - iOS, Android, Web, macOS, Windows, Linux
- 🔒 Secure by design - No tokens stored in package
- 🎨 Native look and feel - Platform-specific modal implementations
- 🚀 Easy to integrate - Simple, consistent API
- ⚡ Production ready - Based on Plaid's official Link SDK
🏗️ Architecture & Security #
This package handles the client-side UI integration of Plaid Link. In a production environment, it works in tandem with your backend server:
- Server: Calls Plaid API (
/link/token/create) to generate alink_token. - App: Fetches
link_tokenfrom your server and passes it toPlaidOmniConnect.open(). - App: User completes the flow; plugin returns a
public_token. - App: Sends
public_tokenback to your server. - Server: Exchanges
public_tokenfor anaccess_token(/item/public_token/exchange) to fetch data.
🔒 Security Note: Never store your Plaid
client_idorsecretinside your Flutter app or this package. All sensitive API calls must happen on your backend.
🚀 Getting Started #
Installation #
Add to your pubspec.yaml:
dependencies:
plaid_omni_connect: ^1.0.0
Run:
flutter pub get
Platform Setup #
iOS & Android
No additional setup required! ✅
macOS
No additional setup required! ✅
Note: Ensure your app has com.apple.security.network.client entitlement.
Windows
Requires WebView2 runtime (pre-installed on Windows 11).
For Windows 10, download: WebView2 Runtime
Linux
Install WebKitGTK:
Ubuntu/Debian:
sudo apt-get install libwebkit2gtk-4.0-dev
Fedora:
sudo dnf install webkit2gtk3-devel
Arch:
sudo pacman -S webkit2gtk
Web
No additional setup required! ✅
Usage #
import 'package:plaid_omni_connect/plaid_omni_connect.dart';
// 1. Get link token from your backend
final linkToken = await getPlaidLinkToken();
// 2. Open Plaid Link with inline modal
await PlaidOmniConnect.open(
configuration: PlaidLinkConfiguration(
linkToken: linkToken,
),
onSuccess: (publicToken, metadata) {
print('✅ Connected: ${metadata.institution.name}');
print('Accounts: ${metadata.accounts.length}');
// Send publicToken to your backend to exchange for access_token
await exchangePublicToken(publicToken);
},
onExit: (error, metadata) {
if (error != null) {
print('❌ Error: ${error.displayMessage}');
} else {
print('User cancelled');
}
},
onEvent: (eventName, metadata) {
print('📊 Event: $eventName');
},
);
📖 API Reference #
PlaidOmniConnect.open() #
Opens Plaid Link as an inline modal within your app.
Parameters:
configuration(required): PlaidLinkConfiguration with your link tokenonSuccess(required): Callback when user successfully connects accountonExit(required): Callback when user exits or encounters erroronEvent(optional): Callback for tracking user events
PlaidLinkConfiguration #
PlaidLinkConfiguration({
required String linkToken, // From your backend
bool noLoadingState = false,
})
Callbacks #
onSuccess:
void Function(String publicToken, LinkSuccessMetadata metadata)
onExit:
void Function(LinkError? error, LinkExitMetadata? metadata)
onEvent:
void Function(String eventName, LinkEventMetadata metadata)
🎨 UX Behavior #
Desktop (macOS, Windows, Linux) #
- Modal dialog (600x800px) centered in your app window
- Blocks parent window - true modal behavior
- Smooth animations - 300ms fade in/out
- Native styling - Follows platform design guidelines
Mobile (iOS, Android) #
- Full-screen modal with native transitions
- Gesture support - Swipe to dismiss
Web #
- Centered modal with backdrop blur
- Responsive - Adapts to screen size
- Keyboard accessible - ESC to close
📚 Complete Example #
See the example directory for a full working demo app.
📄 License #
MIT License - see LICENSE file
Copyright (c) 2025 DecodeWest