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.9

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'

Feeddo requires Android minSdkVersion 21 or higher and Internet permissions:

  1. In android/app/build.gradle (or build.gradle.kts), ensure minSdkVersion is at least 21:

    android {
    defaultConfig {
    minSdkVersion 21
    }
    }
  2. In android/app/src/main/AndroidManifest.xml, make sure the Internet permission is present:

    <uses-permission android:name="android.permission.INTERNET"/>

Feeddo supports macOS, Windows, Linux, and Web out of the box.

For macOS, ensure network client entitlement is enabled in macos/Runner/DebugProfile.entitlements and Release.entitlements:

<key>com.apple.security.network.client</key>
<true/>

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,
);

1. Configure App & Dashboard

To allow Feeddo to send push notifications, you need to provide your Firebase Service Account credentials:

  1. Go to the Firebase Console > Project Settings > Service accounts.
  2. Click Generate new private key to download the JSON file.
  3. Go to feeddo.dev, select your app, and navigate to Settings > Notifications.
  4. Select Google (FCM) and upload the JSON file (or paste its contents).

If you haven’t set up push notifications in your Flutter app yet, follow the Firebase Cloud Messaging Get Started guide.

2. Register Your Token

To get notifications even when the app is closed, register your push token:

String? token = await FirebaseMessaging.instance.getToken();
if (token != null) {
await Feeddo.registerPushToken(
pushToken: token,
pushProvider: FeeddoPushProvider.fcm, // or .apns, .onesignal
);
}

Or pass it directly to init():

String? token = await FirebaseMessaging.instance.getToken();
await Feeddo.init(
apiKey: 'your-api-key',
context: context,
pushToken: token,
pushProvider: FeeddoPushProvider.fcm,
);

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,
);
});

On Desktop (macOS, Windows, Linux) and Web, Feeddo automatically opens as a sleek Intercom-style floating window in the bottom-right corner rather than a full-screen view.

You can customize the desktop popup window constraints:

Feeddo.show(
context,
useSmallWindowOnDesktop: true, // Default: true (set to false for fullscreen dialog)
desktopConstraints: const BoxConstraints(
maxWidth: 420,
maxHeight: 650,
),
);

You can customize the look and feel using FeeddoTheme.

// Dark theme (default)
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;

Update user attributes after login or profile changes:

await Feeddo.updateUser(
userName: 'Jane Smith',
userSegment: 'enterprise',
);

When a user logs out of your app, call Feeddo.dispose() to reset the SDK state, disconnect WebSockets, and clear active notifications:

Feeddo.dispose();