Magnifi Mobile SDK for Flutter
Embed the Magnifi AI advisor directly into your Flutter app.
Installation
dependencies:
magnifi_mobile_sdk: ^0.1.0
flutter pub get
Usage
import 'package:magnifi_mobile_sdk/magnifi_mobile_sdk.dart';
// Initialize once at app startup
Magnifi.init(MagnifiConfig(apiKey: 'YOUR_API_KEY'));
// Launch the Magnifi experience from any widget
Magnifi.show(context);
API
| Method |
Description |
Magnifi.init(config) |
Initialize the SDK with your API key |
Magnifi.show(context) |
Open the Magnifi advisor in a full-screen modal |
Magnifi.isInitialized() |
Check if the SDK has been initialized |
MagnifiConfig
| Parameter |
Type |
Required |
Description |
apiKey |
String |
Yes |
Your Magnifi API key |
environment |
String? |
No |
Target environment |
clientId |
String? |
No |
Your client identifier |
Requirements
- Flutter 3.x+ (Dart >= 3.0)
- iOS 15.0+
- Android API 24+