TruHuddle Widget for Flutter
Add customer support chat to your Android or iOS app.
Install
Requires Flutter 3.41 / Dart 3.11 or newer.
dependencies:
truhuddle_widget: ^1.0.3
Run flutter pub get.
Open chat
Copy your App ID from TruHuddle's Developer settings and add your app's package or bundle identifier in Widget settings.
import 'package:truhuddle_widget/truhuddle_widget.dart';
await TruhuddleWidget.open(context, options: TruhuddleOptions(
appId: 'YOUR_APP_ID',
packageName: 'com.example.app',
getSession: () async {
final session = await yourApi.createSupportSession();
return TruhuddleSession.fromJson(session);
},
));
yourApi.createSupportSession() is your signed-in backend endpoint. Follow the
native session setup guide
to create it. Keep your API secret on your backend. Close the chat when the customer
signs out.
Permissions
Use Android API 24+ and iOS 13+.
Add to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Add to ios/Runner/Info.plist:
<key>NSMicrophoneUsageDescription</key>
<string>Record voice notes for support.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Share photos with support.</string>
Customize
Set your greeting, logo, colors, theme and attachment options in TruHuddle's Widget settings.
Libraries
- truhuddle_widget
- Native, full-screen TruHuddle support for Android and iOS.