zbd_ramp package provides a native Flutter widget for integrating ZBD Ramp into your iOS, Android, and Web applications.
Features
Flutter Optimized
Built specifically for Flutter with native WebView integration
Cross-Platform
Works seamlessly on iOS, Android, and Web
Type Safe
Full Dart type safety with comprehensive type definitions
Real-Time Events
PostMessage communication for error handling, logging, and step tracking
Installation
Add the package to yourpubspec.yaml:
Quick Start
1. Create Session Token
First, initialize a ramp session from your backend or directly in your Flutter app:- Email Authentication
- Access Token Authentication
2. Display the Ramp Widget
Add the widget to your Flutter app:API Reference
initRampSession()
Creates a new session token for the ZBD Ramp widget.Parameters
Either
email OR accessToken must be provided for authentication.Returns
refreshAccessToken()
Refreshes an expired access token using a refresh token.Token Lifecycle:
- Access tokens expire after 30 days
- Refresh tokens expire after 90 days
- Both tokens are received via webhook after user completes OTP login with email
Parameters
Returns
Example
ZBDRampWidget
Main Flutter widget that renders the ZBD Ramp interface.Constructor
RampConfig
Configuration for the widget:RampCallbacks
Event handlers for widget lifecycle:Complete Example
Hereβs a full implementation with all callbacks:Error Handling
Handle errors gracefully in your application:Platform Setup
iOS Configuration
Add the following to yourios/Runner/Info.plist:
Android Configuration
Add permissions to yourandroid/app/src/main/AndroidManifest.xml:
Try the Example App
The quickest way to see the SDK in action:1
Clone the Repository
2
Install Dependencies
3
Run the Example
4
Test with Your Credentials
- Enter your ZBD API Key
- Fill in email and Lightning destination
- Tap βCreate Session & Load Rampβ
Resources
Package on pub.dev
View the official Flutter package
GitHub Repository
View source code and example app
API Reference
Complete API documentation
Webhook Events
Handle webhook notifications
Other SDKs
- TypeScript
- React
- React Native
Core TypeScript/JavaScript package for web applications.View TypeScript SDK β