insito_flutter.
It works in any Flutter app — iOS, Android, and the other Flutter targets.
Requirements
The package pulls in
http and shared_preferences transitively — no extra
setup is required. shared_preferences backs the persistent response queue, so
responses survive bad networks and app cold-starts.
Install
flutter pub get (the flutter pub add command does this for you).
Initialise the SDK
MicroSurvey.init() boots the singleton. Call it once, as early as
possible — the top of main() is ideal. It’s async because it seeds the
offline queue, screen-map timer, and per-install counters.
main.dart
init() validates the key (proj_xxx format) and throws if it’s malformed —
easier to catch in development than a delayed network error.
Wire up the provider
InsitoProvider is the widget that renders the survey modal above your app.
Wrap it around your MaterialApp (or WidgetsApp/CupertinoApp).
main.dart
InsitoProvider renders the modal as a sibling of your app and supplies its
own Directionality, MediaQuery, Localizations, Theme, and Overlay,
so it works no matter where you mount it in the tree.Identify your user
Once a user signs in (or as early as you have a stableuserId), call
identify(). The SDK caches identity for 24 hours, so repeat sessions are free.
Fire a trigger
At any key moment, fire a trigger by name. The server decides whether a survey is eligible; if it is, the modal renders insideInsitoProvider.
InsitoConfig schema,
API reference for every method, and the
example app for a
working MaterialApp setup with screen tracking.