Early access preview

Flutter quickstart

This guide takes a fresh Flutter app from no Caliper to a live “how did you hear about us” survey that fires once after first open and writes the answer into Adjust as an install-level event. Plan on about ten minutes.

1. Add the pub dependency

Add Caliper to your pubspec.yaml:

dependencies:
  caliper: ^1.0.0

Then fetch it:

flutter pub get

The plugin pulls its native modules through the usual platform tooling, so let CocoaPods resolve on the next iOS build. Caliper reads no IDFA or Google Advertising ID and does no fingerprinting — the answer is reported by the person using the app, so the result is first-party by construction.

2. Configure in main()

Configure Caliper once in main(), before runApp, so timing is set before the first frame.

import 'package:caliper/caliper.dart';

void main() {
  Caliper.configure(apiKey: 'cal_live_…');

  Caliper.survey(Survey.howDidYouHear)
      .after(Trigger.firstOpen)
      .sync([Destination.adjust, Destination.slack]);

  runApp(const ExampleApp());
}

Caliper.survey(Survey.howDidYouHear) selects the question. .after(Trigger.firstOpen) waits for the first launch on a clean install and schedules the survey for the next natural pause in the session. .sync([...]) names the destinations the answer is forwarded to. Initialize your Adjust Flutter plugin in the same startup path so its event API is ready when an answer arrives.

3. Run it on a clean install

Uninstall the app first — the survey fires once per install, keyed off first open, so reinstalling is the only way to trigger it again. Launch the app. After first open you will see one closed-option survey with answers in randomized order and a prominent Skip. A skipped survey is better than a guessed answer, so the skip is deliberately easy to reach.

4. Confirm it in Adjust

When someone answers, Caliper forwards the response as a custom in-app event through Adjust’s SDK-to-SDK event API, attached to that install. Open the app’s events in your Adjust dashboard. A how_did_you_hear event will appear carrying the chosen answer as a property — it shows up in dashboards and postbacks like any other in-app event, so you can segment installs by self-reported source alongside your network data.

Next steps