engine_mobile_flutter_sdk 0.0.1
engine_mobile_flutter_sdk: ^0.0.1 copied to clipboard
Flutter SDK for Engine by MoneyLion. Provides turnkey marketplace flows for Personal Loans, Credit Cards, and more.
Engine Flutter SDK #
Flutter SDK for Engine by MoneyLion. Provides turnkey marketplace flows for Personal Loans, Credit Cards, Deposits, Auto Insurance, and Thin Vertical marketplaces.
Features #
- 🚀 Quick Integration - Add marketplace flows to your Flutter app in minutes
- 📝 2nd Party Prefill - Pre-populate user data to reduce form friction
- 📊 Event Callbacks - Track user actions for analytics and flow control
- 🎨 Configurable UI - Customize splash screen, navigation bar, and branding
- 🔒 Secure - PII handled via secure server-to-server API, never exposed in client
Getting Started #
Prerequisites #
- Flutter 3.0.0 or higher
- Dart 3.10.7 or higher
- Engine API key (Get one here)
Installation #
Add to your pubspec.yaml:
dependencies:
engine_mobile_flutter_sdk: ^0.0.1
Then run:
flutter pub get
Prefill Data Fields (Personal Loans) #
| Field | Type | Description |
|---|---|---|
| firstName | String | First name |
| lastName | String | Last name |
| String | Email address | |
| dateOfBirth | String | ISO 8601 format (e.g., "1990-01-15") |
| ssn | String | Social Security Number |
| primaryPhone | String | Phone number |
| address | Address | Street, city, state, zip |
| loanAmount | int | Requested loan amount |
| purpose | LoanPurpose | Loan purpose |
| creditRating | CreditRating | Self-reported credit rating |
| propertyStatus | PropertyStatus | Own, rent, etc. |
| employmentStatus | EmploymentStatus | Employment status |
| annualIncome | int | Annual income |
Event Callbacks #
| Event | Description |
|---|---|
| onInitialize | Called when the SDK initializes |
| onCreate | Called when a new lead is created |
| onUpdate | Called when a lead is updated |
| onNavigate | Called when user navigates between pages |
| onSubmit | Called when the flow is submitted |
| onRateTableRender | Called when offers are displayed |
| onOfferClick | Called when an offer is selected |
| onExit | Called when user exits the flow |
| onError | Called when an error occurs |
Development #
Setup #
cd flutter_wrapper
flutter pub get
Git Hooks (Lefthook) #
This project uses Lefthook for pre-commit and pre-push checks.
# Install lefthook (if not already installed)
brew install lefthook
# Install git hooks (run from repo root)
cd ..
lefthook install
Once installed, flutter analyze will run automatically:
- Pre-commit: Before each commit on changed
.dartfiles - Pre-push: Before each push on changed
.dartfiles
Run Linting #
flutter analyze
Run Tests #
flutter test