Flutter plugin for the Erxes messenger. It wraps the native
Erxes SDKs — MessengerSDK (iOS) and io.github.munkhorgilb:messenger-sdk
(Android) — behind one idiomatic Dart API built on platform channels.
Repository:
erxes-flutter-sdk· Package name:erxes_flutter_sdk(pub package names usesnake_case).
| Feature | iOS | Android |
|---|---|---|
| Chat mode (full screen) | ✅ | ✅ |
| Voice messages | ✅ | ✅ |
customData on user |
✅ | ❌ (ignored by native SDK) |
This plugin targets chat mode only.
dependencies:
erxes_flutter_sdk:
git:
url: https://github.com/Munkhorgilb/flutter-sdk.git-
Minimum iOS 16.0, Swift 5.9.
-
The underlying
erxes-ios-sdkships to CocoaPods asErxesMessengerSDK0.30.14 and is pulled in automatically onpod install— no extra setup needed. (SPM host apps are still supported via the bundledPackage.swift.) -
For voice messages, add to
ios/Runner/Info.plist:<key>NSMicrophoneUsageDescription</key> <string>Used to record voice messages in support chat.</string> <key>NSSpeechRecognitionUsageDescription</key> <string>Used to transcribe voice messages in support chat.</string>
- Minimum
minSdk24, Java/Kotlin JVM target 17. - The native SDK (
io.github.munkhorgilb:messenger-sdk) is pulled from Maven Central automatically. - Release builds: the plugin ships consumer ProGuard rules that keep Material icon and Erxes SDK classes used to resolve action icons by name.
import 'package:erxes_flutter_sdk/erxes_flutter_sdk.dart';
// Listen for header / drawer action taps.
final sub = ErxesMessenger.onAction.listen((id) {
if (id == 'close') Navigator.of(context).pop();
});
await ErxesMessenger.configure(
integrationId: 'YOUR_INTEGRATION_ID',
endpoint: 'https://yourcompany.erxes.io', // or serverUrl / subDomain
user: const ErxesUser(name: 'Jane Doe', email: 'user@example.com'),
homeActions: const [
ErxesAction(id: 'close', title: 'Close', iosIcon: 'xmark', androidIcon: 'Close'),
],
);See example/ for a full settings → support → chat flow.
| Method | Description |
|---|---|
configure({...}) |
Configure and (in chat mode) present the messenger. |
setUser(ErxesUser) |
Update the current customer identity. |
clearUser() |
Clear the current customer identity. |
showMessenger() |
Present the chat messenger UI. |
hideMessenger() |
Dismiss the messenger (no-op on Android). |
onAction |
Stream<String> of tapped action ids. |
onReady |
Stream<void> emitted when the messenger is ready. |
ErxesUser({ email, phone, name, customData })ErxesAction({ id, title, iosIcon, androidIcon })
- iOS build can't find
MessengerSDK— runpod installfromios/(orflutter cleanand rebuild) so CocoaPods fetchesErxesMessengerSDK. - Android action icons missing in release — confirm minification didn't strip
icon classes; the bundled
consumer-rules.proshould cover this.