devreply 0.4.0 copy "devreply: ^0.4.0" to clipboard
devreply: ^0.4.0 copied to clipboard

DevReply for Flutter: the native in-app chat between your app's users and you.

DevReply for Flutter #

The in-app chat between your app's users and you, answered from the DevReply dashboard. This plugin opens the native DevReply chat (SwiftUI on iOS, Jetpack Compose on Android) from Dart. No UI in Dart, no web view.

  • Home with start buttons (bug, billing, idea, question), the user's conversations, and the chat.
  • Photos and files, name first, optional email, "we got it" with your reply time.
  • An unread bubble over your app, and the unread count as a Dart stream.

Requires iOS 17 and Android 8 (API 26).

Install #

flutter pub add devreply
  • iOS: in ios/Podfile, platform :ios, '17.0'.
  • Android: in android/app/build.gradle(.kts), minSdk = 26. The plugin adds JitPack (where the DevReply Android SDK is published) to the build's repositories; if your settings.gradle forbids project repositories, add maven { url = uri("https://jitpack.io") } there.

Using a coding agent? Give it your app's setup guide from the dashboard (Settings → Add DevReply to your app): it has your keys and does these steps for you.

Use #

import 'package:devreply/devreply.dart';

// Once, at startup: your public keys from the dashboard (safe to ship). Never a secret key (sk_…).
await DevReply.configure(ios: 'pk_…', android: 'pk_…');

// From any button
DevReply.present();                          // or DevReply.present(DevReplyCategory.bug)

// Optional
DevReply.setUser(name: 'Ana', email: 'ana@example.com');
DevReply.setAttributes({'plan': 'pro', 'trial': false});
DevReply.unreadCountChanges.listen((count) => setState(() => unread = count));
DevReply.setShowsUnreadBubble(false);        // if you show the count yourself

Languages: the chat follows the device's language (15 languages); DevReply.setLocale('es') if your app has its own language setting (null follows the device).

Who replied: each reply shows the teammate's name, title and photo (their persona in the dashboard), and the chat's header shows your app icon. Nothing to set up in the app.

Replies from email: DevReply emails users replies they haven't read, with a "Reply in the app" button that opens yourapp://devreply?devreply=<conversation>. Add the scheme (iOS CFBundleURLTypes in Info.plist; Android a VIEW intent filter with android:scheme="yourapp" android:host="devreply" on MainActivity) and set yourapp://devreply as the deep link in the dashboard (the app → Settings). The plugin catches these links itself; if a links package swallows them first, pass them on with DevReply.handle(url). With go_router and Flutter deep linking on, redirect /devreply to where the user already is.

Push (iOS): pass the APNs device token as hex (e.g. firebase_messaging getAPNSToken()) with DevReply.registerPushToken(token), and upload your APNs key in the dashboard. Android push comes later.

How it's built #

ios/ compiles the DevReply iOS SDK sources (ios/DevReplySDK, the same code as devreply-ios) with a thin plugin class. android/ depends on devreply-android from JitPack. Dart only passes calls through.

Example and tests #

flutter test
cd example && flutter run --dart-define=DEVREPLY_IOS_KEY=pk_… --dart-define=DEVREPLY_ANDROID_KEY=pk_…
maestro test -e NONCE=123 maestro/chat.yaml   # with a script replying "Founder reply 123" from the dashboard API

License #

MIT, see LICENSE. Issues and ideas welcome: see CONTRIBUTING.

0
likes
0
points
568
downloads

Publisher

verified publisherdevreply.com

Weekly Downloads

DevReply for Flutter: the native in-app chat between your app's users and you.

Homepage
Repository (GitHub)
View/report issues

Topics

#chat #support #customer-support #feedback #in-app-messaging

License

unknown (license)

Dependencies

flutter

More

Packages that depend on devreply

Packages that implement devreply