respondo_sdk 0.1.2 copy "respondo_sdk: ^0.1.2" to clipboard
respondo_sdk: ^0.1.2 copied to clipboard

Native Respondo support-chat SDK for Flutter: chat, news, surveys, banners, checklists and push notifications in pure Dart, with no native code.

respondo_sdk #

Respondo is an AI-powered customer support platform — an AI agent plus seamless human handoff. This package puts that support experience right inside your Flutter app, in pure Dart.

Why Respondo #

Respondo answers your customers instantly. An AI agent resolves questions in real time from your own knowledge base, and escalates to a human teammate the moment a conversation needs one — with full context, no repetition. Every channel (in-app chat, email, Slack, Discord, Telegram, WhatsApp) lands in the same shared inbox, so support stays in one place.

respondo_sdk is the Flutter client for that platform: a drop-in chat surface with no native code to maintain.

Features #

  • AI + human support chat in a native bottom-sheet, themed from your Respondo widget config.
  • Realtime messaging over WebSocket with automatic fallbacks and reconnect.
  • File attachments through a host-provided picker — the package stays free of native plugins.
  • Push notifications (APNs / FCM) — plug in your own firebase_messaging; the SDK consumes the token and payload.
  • Identity verification with HMAC-signed users — the trusted pattern you already know from tools like Intercom.
  • Engagement surfaces: surveys (NPS / CSAT), news, checklists, and proactive messages.
  • 8 UI languages with automatic locale detection.
  • Pure Dart — no platform channels, no native code, zero glue to maintain.

Install #

dependencies:
  respondo_sdk: ^0.1.1

The SDK relies on http, web_socket_channel, and uuid. To persist the visitor session across restarts, add path_provider as well (used in the quick start below).

Quick start #

import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:respondo_sdk/respondo_sdk.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Persist the visitor session so conversations survive app restarts.
  final dir = await getApplicationSupportDirectory();

  await Respondo.init(
    RespondoConfig(
      agentId: '<agent-uuid>',
      channelId: '<channel-uuid>',
      locale: 'en',
      storageDirectory: dir.path, // omit for in-memory (lost on restart)
    ),
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // Lets the SDK present the chat bottom-sheet without a host BuildContext.
      navigatorKey: Respondo.navigatorKey,
      home: Scaffold(
        body: Center(
          child: ElevatedButton(
            onPressed: Respondo.open, // show the support chat
            child: const Text('Open support chat'),
          ),
        ),
      ),
    );
  }
}

Identify a signed-in user #

// userHash is an HMAC computed by YOUR backend — the secret must never ship in the app.
// See the identity verification guide in the docs at https://respondo.ai/docs
Respondo.identify(
  RespondoIdentity(
    userId: 'u_123',
    email: 'jane@example.com',
    userHash: '<hmac-from-your-backend>',
  ),
);

Respondo.reset(); // on logout: revoke the session and start a fresh visitor

Without a userHash, the chat simply works anonymously — identity is optional.

Push notifications #

// Your app owns the token (e.g. via firebase_messaging); the SDK only receives it.
Respondo.setPushToken(fcmToken);
Respondo.clearPushToken(); // on logout

// On an incoming data push or a tap on it:
final handled = Respondo.handlePushData(remoteMessage.data);

Observe unread state #

Respondo.unreadCountStream.listen((count) => setBadge(count));
Respondo.onUrlRequested = (url) { openInApp(url); return true; };

Where to get agentId and channelId #

Open the Respondo dashboard → Channels → Widget — the agent and channel IDs are shown there. No API key is required: the SDK talks to your public widget channel.


Ready to add AI-powered support to your Flutter app? Get started at https://respondo.ai.

0
likes
160
points
109
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Native Respondo support-chat SDK for Flutter: chat, news, surveys, banners, checklists and push notifications in pure Dart, with no native code.

Homepage

License

MIT (license)

Dependencies

flutter, http, uuid, web_socket_channel

More

Packages that depend on respondo_sdk