insito_flutter library

Insito — in-app micro-surveys for Flutter apps.

A Dart/Flutter port of the @insito/react-native SDK. Initialise once, identify the user, then trigger surveys at key moments.

Classes

ActiveSurvey
A survey ready to be presented, as delivered by /v1/sdk/event and /v1/sdk/evaluate.
Answer
A single collected answer.
BrandColors
A semantic colour palette; null on any token means "inherit the preset".
BrandConfig
INS-103 Brand Kit — project styling delivered alongside a survey and mapped onto InsitoTheme by brandConfigToOverrides.
EvaluateOptions
Options for InsitoClient.evaluate.
InsitoClient
The imperative runtime, exposed through the MicroSurvey facade.
InsitoColors
InsitoColorsOverride
InsitoComponents
InsitoComponentsOverride
InsitoConfig
Configuration passed to MicroSurvey.init.
InsitoEventPayload
Payload delivered to an InsitoEventListener. Only the fields relevant to the fired event are populated.
InsitoNavigatorObserver
INS-49 — drop-in NavigatorObserver that reports screen visits to Insito.
InsitoProvider
Wrap your app with InsitoProvider so the SDK can render the survey modal above your UI:
InsitoRadii
InsitoRadiiOverride
InsitoScope
Inherited access to Insito helpers from anywhere under InsitoProvider.
InsitoSpacing
InsitoSpacingOverride
InsitoTheme
INS-43 — the design tokens the survey UI renders with. Mirrors the RN InsitoTheme shape (colors, typography, spacing, radii, components).
InsitoThemeOverrides
A partial theme; only the set (non-null) tokens override the base. Mirrors RN's Partial<InsitoTheme> deep merge.
InsitoTypography
InsitoTypographyOverride
InsitoUser
The current identified user.
InsitoVariableDeclaration
INS-144 — an event/screen declared in init() for the dashboard registry.
LogicCondition
LogicRule
MicroSurvey
The public entry point of the SDK. A thin static facade over the singleton InsitoClient.
QuestionLogic
SdkLabels
INS-135 — resolved SDK UI chrome strings. Every field is populated because callers receive the merged result (defaults < dashboard < init overrides).
SubmitResponseOptions
Options for InsitoClient.submitResponse.
SubmitResponseResult
SurveyLogic
SurveyQuestion
UserProperties
Identify arguments. Mirrors the RN IdentifyArgs shape.

Enums

BrandThemeMode
INS-104 appearance mode. auto follows the device colour scheme.
InsitoAppearance
How the survey modal resolves its colour scheme.
InsitoEvent
INS-52 — the pub/sub events the SDK emits. Matches the RN SDK 1:1.
QuestionType
The kinds of steps a survey can contain. The four answerable types collect a response; welcomeScreen / endScreen are copy/CTA-only steps.
SdkState
Runtime state machine, mirroring the RN SDK.
SubmitStatus
ThemePreset
The built-in theme presets, matching the RN SDK.

Constants

themePresets → const Map<ThemePreset, InsitoTheme>
Preset registry keyed by ThemePreset.

Typedefs

InsitoEventListener = void Function(InsitoEventPayload payload)