insito_flutter 0.4.0
insito_flutter: ^0.4.0 copied to clipboard
In-app micro-surveys for Flutter — NPS, ratings, and multi-question flows with theming, offline queueing, logic branching, and automatic screen tracking.
0.4.0 #
- The survey works with VoiceOver and TalkBack (INS-182). See Accessibility.
- Every control has a role, a label and a state. NPS scores and rating stars announce when they're selected, single choice options are radio buttons, multiple choice options are checkboxes, question titles are headings, and required questions say so.
- Opening the survey announces it and moves focus into it. Each new question is announced, and the app behind the survey is hidden from the screen reader while it's open.
- The screen reader's escape gesture closes the survey.
- New screen-reader label keys, translatable from the dashboard:
a11ySurvey,a11yClose,a11yNpsScore,a11yRating,a11yRequired,a11yCharacterCount.
- Every control is at least 48 × 48 dp. Visible change: on phones the NPS scale wraps into two rows (0–5 and 6–10). Long rating scales wrap too. The close and dismiss buttons got bigger hit areas.
- With Reduce Motion (iOS) or Remove animations (Android) on, the survey appears without sliding in.
- Rating questions use the scale set in the builder (
minValuetomaxValue, for example 1–10) and show its low and high labels. They used to always show 5 stars.
0.3.1 #
- The package ships an Apple privacy manifest at
privacy/PrivacyInfo.xcprivacy(INS-174). Copy its collected data types into your app'sios/Runner/PrivacyInfo.xcprivacy; see App Store and Google Play privacy labels.
0.3.0 #
- Consent controls (INS-173):
MicroSurvey.optOut()stops all collection on the device. Nothing is sent untiloptIn(): no identify, triggers, screen tracking or responses. Queued answers and the cached identity are deleted and an open survey closes. The decision is stored, so it survives relaunches, and it can be called beforeinit().MicroSurvey.optIn()re-enables collection. Callidentify()afterwards.InsitoConfig(deferCollection: true)sends nothing untiloptIn()is called, for apps that ask for consent first. Once given, consent is remembered.MicroSurvey.reset()forgets the identified user (e.g. on logout). Queued answers are still delivered.MicroSurvey.consentreturns aConsentState(granted,denied,pending).
- While collection is disabled,
submitResponsereturnsSubmitStatus.failedwith reasoncollection_disabledand stores nothing. - The test-only
InsitoClient.reset()is nowresetForTesting();reset()is the public method above.
0.2.4 #
- Breaking for misconfigured apps:
init()now refuses a plainhttp://apiUrl. Answers and your project key travel in every request, so the SDK requireshttps://.http://is still accepted forlocalhost,127.0.0.1,10.0.2.2(Android emulator) or a private-network IP, and only in a debug (kDebugMode) build. A release build pointing athttp://now throws anArgumentErrorat startup instead of sending data in clear text. - Answers are no longer lost or double-counted when delivery fails (INS-181). Each answer set carries an
Idempotency-Keythat's reused on every retry, so the API records it once (API 0.5.1+).submitResponsenow queues on timeouts,408,429and5xxas well as when offline. It used to report those as failed and discard the answers.- At the plan limit (
402) and on401, the answers are queued too, and retried when the app returns to the foreground or is relaunched. They used to be discarded withresponseFailed. - Other
4xxresponses are still permanent: the item is dropped andresponseFailedfires. - Retries use exponential backoff with jitter (2 s up to 5 min), honour
Retry-After, and also run when the app returns to the foreground.
- The offline queue now holds up to 200 items (was 50), and items older than 7 days are discarded unsent.
- Android: the queue moved from SharedPreferences, which Auto Backup copies, to a file in the app's
no_backupdirectory. An existing queue is moved on first use. Adds apath_providerdependency.
0.2.3 #
- The example app no longer ships a default project key. Pass your own with
--dart-define=INSITO_API_KEY=proj_...(seeexample/README.md). The key that shipped in 0.2.2 has been revoked.
0.2.2 #
- Fix — the survey modal now renders inside the host app's own
Overlayinstead of a detached sibling overlay. This keeps its text fields in the app's focus/IME tree, so backspace/deletion works in open-text and "Other" inputs, and the "Other" input auto-focuses when selected. Also centered the rating stars and removed per-keystroke rebuilds of the text field.
0.2.1 #
- INS-136 fix — offline/queued responses now preserve the render-time device locale (
QueuedResponse.locale) so per-market analytics stay accurate when a submit is retried from the queue.
0.2.0 #
- INS-136 — multilingual surveys. The SDK now resolves per-locale question text, multiple-choice option labels, and welcome/end screen copy from the device locale (exact match → language prefix → default language). Multiple-choice answer values stay canonical so analytics remain consistent across languages.
- SDK UI labels (INS-135) are now locale-aware: the dashboard delivers per-locale label sets and the SDK resolves them against the device locale, layered over the flat default set and
init({ labels })overrides. - Responses submitted via
/v1/sdk/responsenow carry the device locale so the dashboard can slice analytics per market.
0.1.4 #
- The survey footer's "Powered by" attribution now shows the Insito icon+wordmark lockup next to the text, tinted to the muted theme colour. The mark is embedded as bytes and rendered via
Image.memory, so it adds no bundled asset and stays deliverable through Shorebird code patches.
0.1.3 #
- Brought the survey footer to visual parity with
@insito/react-native: the primary action now fills the available width with a 52pt minimum height, Back/Skip render as outlined buttons, and the welcome screen's dismiss link is centered and underlined. - Added the footer's hairline top border, and the disabled primary button now uses
colors.borderrather than a 50% opacity overlay, matching the React Native SDK. - Reworked the
example/app into a four-tab "Demo Bank" showcase mirroring the React Native demo, coveringapp_opened,transfer_completed,card_viewed, and screen-tracking triggers.
0.1.2 #
- INS-117 — report a clean
osVersiononidentify()viadevice_info_plus(iOS system version, Android API level) so the dashboard's audience OS-version breakdown matches the React Native SDK. Falls back gracefully when the plugin is unavailable. - Added unit tests for device metadata auto-capture and the
identify()metadata merge (developer keys win).
0.1.1 #
- Raised the minimum SDK to Flutter 3.27 / Dart 3.6 and adopted
Color.withValues, clearing all analyzer deprecation hints. - Expanded the package description and refreshed
flutter_lintsto keep the pub.dev score maxed.
0.1.0 #
- Initial release. Flutter/Dart port of the
@insito/react-nativeSDK. MicroSurvey.init()/identify()/trigger()/evaluate()/submitResponse()/dismissSurvey().InsitoProviderrenders the survey modal;InsitoNavigatorObserverauto-tracks screens.- Four question types (NPS, rating, multiple choice, open text) plus welcome and end screens.
- Offline response queue, 24h identify cache, screen-map batching, per-install trigger counters.
- Theming with
light/dark/minimal/roundedpresets, Brand Kit mapping, and dark-mode auto-detection. - Pub/sub event system with 10 events.