insightdive_sdk 0.2.1 copy "insightdive_sdk: ^0.2.1" to clipboard
insightdive_sdk: ^0.2.1 copied to clipboard

Flutter SDK for Insightdive in-app surveys. Embeds a modal bottom-sheet survey, streams lifecycle events, and collects feedback without user identifiers.

insightdive_sdk #

Drop-in Flutter SDK for Insightdive — the in-app feedback platform. Embeds a survey as a modal bottom sheet, streams lifecycle events back to your app, and stays fully anonymous — no user identifiers are ever passed to the server.

Install #

dependencies:
  insightdive_sdk: ^0.2.1

3-line integration #

import 'package:insightdive_sdk/insightdive_sdk.dart';

void main() {
  Insightdive.configure(
    tenant: 'acme',                // your workspace slug
    survey: 'onboarding',           // the project slug
    sdkToken: 'sdk_abc123...',     // copy from Admin → Project → SDK Token
  );
  runApp(const MyApp());
}

// anywhere a BuildContext is available:
final result = await Insightdive.show(context);

Configuration #

Field Type Description
tenant String Workspace slug — the subdomain on insightdive.com (e.g. 'acme').
survey String Project slug from the admin (e.g. 'onboarding'). Always serves the currently active deployment.
sdkToken String Authentication token found in Admin → Project → SDK Token. Required — the survey returns an access denied page without it.
baseUrl String? Full URL override for staging or self-hosted instances (e.g. 'http://acme.localhost:3000').
productVersion String? Free-form version stamped on every submission (e.g. '1.2.3').
productIdentifier String? Surface slug — useful when one app embeds the SDK in several places.
locale String? Locale to render the survey in. Falls back to the survey's default.
theme String? 'light' or 'dark'. Falls back to the survey's authored theme.

The SDK loads https://<tenant>.insightdive.com/s/<survey>?sdkToken=... by default. Rotating the survey from the admin doesn't require a new app build — the /s/... route always resolves to whichever deployment is active.

Lifecycle events #

Subscribe to Insightdive.events to react to user progress:

Insightdive.events.listen((event) {
  switch (event) {
    case FeedbackReady():      // page loaded, bridge alive
    case FeedbackViewed():     // SurveySession registered as `viewed`
    case FeedbackStarted():    // user clicked Commencer
    case FeedbackCompleted(:final submissionId):
      analytics.track('feedback_completed', {'id': submissionId});
    case FeedbackDismissed():
      analytics.track('feedback_dismissed');
  }
});

The same identifiers (sessionId, submissionId) are also returned by the Insightdive.show(context) Future, so you can use either pattern.

Programmatic control #

// Trigger by name — reserved for server-side event routing in a later
// release. Currently behaves identically to show().
await Insightdive.trigger(context, 'ssh_failed_3x');

// Close the sheet from code (e.g. on logout)
Insightdive.hide(context);

Platform support #

Platform Status
iOS ✅ Supported
Android ✅ Supported
macOS ✅ Supported
Windows ✅ Supported
Web ⚠️ Untested — webview_flutter on Flutter web requires extra setup
Linux ⚠️ Untested

Privacy #

The SDK does not collect or transmit any user-identifying data. Only the deploymentId, optional productVersion, optional productIdentifier, locale, and theme fields are forwarded to the server. Submissions are linked back to a SurveySession row server-side via an opaque id; that id never leaves the device tied to anything personal.

License #

MIT. See LICENSE.

0
likes
0
points
414
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

Flutter SDK for Insightdive in-app surveys. Embeds a modal bottom-sheet survey, streams lifecycle events, and collects feedback without user identifiers.

Homepage
Repository (GitHub)
View/report issues

Topics

#feedback #survey #nps #csat #webview

License

unknown (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on insightdive_sdk