Skip to content

Flutter Integration

Feeddo allows you to drop a live AI support chat into your Flutter app with just 2 lines of code.

Add feeddo_flutter to your pubspec.yaml:

dependencies:
feeddo_flutter: ^0.1.2

Then install the package:

Terminal window
flutter pub get

Feeddo requires a minimum deployment target of iOS 15.0.

  1. Open your project in Xcode (open ios/Runner.xcworkspace).

  2. Select the Runner project in the left navigation panel.

  3. In the project targets list, select Runner.

  4. Select the General tab.

  5. In the Deployment Info section, set Minimum Deployments to 15.0.

  6. Ensure your ios/Podfile also specifies platform 15.0:

    platform :ios, '15.0'

Sign up at feeddo.dev and grab your API key from the dashboard.

Call Feeddo.init() when your app starts (usually in your main screen or main.dart).

import 'package:feeddo_flutter/feeddo_flutter.dart';
// ... inside your widget or initialization logic
await Feeddo.init(
apiKey: 'your-api-key-here',
context: context,
);

Add a button anywhere in your app to open the support widget:

ElevatedButton(
onPressed: () {
Feeddo.show(context);
},
child: Text('Get Help'),
)

To show feature requests and bug reports directly:

ElevatedButton(
onPressed: () {
Feeddo.showCommunityBoard(context);
},
child: Text('Request a feature'),
)

The init() method supports various parameters to customize the user experience.

await Feeddo.init(
apiKey: 'your-api-key',
context: context,
// User identification
externalUserId: 'user_12345',
userName: 'John Doe',
// Segmentation
userSegment: 'premium',
subscriptionStatus: 'active',
// Custom data
customAttributes: {
'plan': 'pro',
'country': 'US',
},
// Notifications
isInAppNotificationOn: true,
pushToken: 'fcm-token-here',
pushProvider: FeeddoPushProvider.fcm,
);

If you haven’t configured push notifications, follow the Firebase Cloud Messaging guide.

Register your token with Feeddo:

await Feeddo.registerPushToken(
pushToken: 'your-push-token',
pushProvider: FeeddoPushProvider.fcm, // or .apns, .onesignal
);

Handle incoming messages:

// Background/Terminated
FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
Feeddo.handleNotificationTap(context, message.data);
});
// Foreground
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
Feeddo.showInappNotification(
context: context,
title: message.notification?.title ?? 'New Message',
message: message.notification?.body ?? '',
data: message.data,
);
});

You can customize the look and feel using FeeddoTheme.

// Dark theme
Feeddo.show(context, theme: FeeddoTheme.dark());
// Light theme
Feeddo.show(context, theme: FeeddoTheme.light());
final myTheme = FeeddoTheme(
isDark: true,
colors: FeeddoColors(
background: Color(0xFF1A1A2E),
textPrimary: Color(0xFFFFFFFF),
primary: Color(0xFF00D9FF),
// ... customized colors
),
);
Feeddo.show(context, theme: myTheme);
int unreadCount = Feeddo.unreadMessageCount;
await Feeddo.updateUser(
userName: 'Jane Smith',
);