DocumentationFlutter · Dart

Flutter with Dart integration

One feedback flow for both mobile stores.

A Material 3 feedback experience for iOS and Android, with automatic context, a local offline queue, history, and team replies.

Before you begin

A project, a key, and your app.

Create a project in Heardock and copy its hd_pub_ publishable key. The key identifies the project and is safe to include in your client.

Create a project
  • Flutter 3.27+
  • Dart 3.6+
  • An iOS or Android app
01

Install the package

Add heardock_flutter to your app. It includes the UI and re-exports the headless core APIs.

terminal
flutter pub add heardock_flutter
02

Configure before runApp

Configure once during startup. Device, locale, and screen collection can be controlled independently; user identity remains opt-in.

main.dart
import 'package:heardock_flutter/heardock_flutter.dart';

void main() {
  Heardock.configure(
    HeardockConfig(
      publicKey: 'hd_pub_your_key',
      collect: const CollectOptions(
        device: true,
        locale: true,
        screen: true,
      ),
      theme: const HeardockTheme(
        primaryColor: Color(0xFFE4572E),
        borderRadius: 16,
      ),
    ),
  );

  runApp(const MyApp());
}
03

Open the feedback form

show() always opens the compose form. It pushes a full-screen route by default; a sheet is available globally or per call.

settings_page.dart
ElevatedButton(
  onPressed: () => Heardock.show(context),
  child: const Text('Feedback'),
)

// Optional bottom sheet on phones, centered dialog on wide screens:
await Heardock.show(
  context,
  presentation: FeedbackPresentation.sheet,
);
04

Open the feedback center

open() shows the device’s feedback history when it exists, and opens the compose form when the history is empty. Team replies are read-only in the app.

feedback_entry.dart
Heardock.open(context);

// Attach optional product context whenever the route changes:
Heardock.setContext(
  page: '/settings/export',
  metadata: {'plan': 'pro'},
);
05

Localize or identify optionally

Use the built-in English or Simplified Chinese strings, override any subset, and update the active UI at runtime. Identity fields are only sent when explicitly provided.

configuration.dart
Heardock.configure(HeardockConfig(
  publicKey: 'hd_pub_your_key',
  locale: 'zh-CN',
  strings: const {'title': '告诉我们你的想法', 'send': '提交'},
));

Heardock.identify(
  id: 'u_123',
  email: 'bob@example.com',
  name: 'Bob',
);

Verify the integration

Send one note. Check the whole loop.

  • Open the form and select a category.
  • Submit a short test message from a debug build.
  • Confirm the note and its context appear in your Heardock inbox.
  • Reply from the inbox and check the app’s feedback history.
Open the inbox
Next integrationWeb