On this page
Check package resolution, widget placement and a recorded test journey to find where your Flutter integration stops working. Use synthetic data and test Android and iOS separately.
Package covered: cux_analytics_sdk 0.0.27.
Dependencies do not resolve or the app does not build
Check Dart, Flutter and resolved dependencies against the installation requirements. The declared Dart constraint is ^3.4.3; the package's declared Flutter minimum alone does not establish compatibility with all dependencies.
Run flutter pub get and record the actual dependency resolution or native build error. Check your app's Android and iOS build requirements. Do not treat this Flutter package as a native Android 1.2.0 upgrade.
Initialization cannot find MediaQuery
Use a BuildContext below a MediaQuery. The installation example initializes from a wrapper in MaterialApp.builder and keeps the call out of repeated builds.
Merge the wrapper into your existing app. Do not add a second MaterialApp or initialize again from each screen. Preserve other builders and wrappers your app needs.
No recording appears
Check the mobile project token without logging or sharing it. Confirm initialization runs and app content is inside AnalyticsWidget. On Android, check the internet permission in your app manifest.
If you use needConfirmToStart: true, check that your consent handler calls resumeCollectingData() when collection is allowed. isCollectingData() reports collection state; it does not confirm delivery. Run a short journey and inspect the matching mobile project in CUX.
Navigation is missing or unclear
Use createNavigationObserver(rootWidget: ..., navigatorTag: ...) for Navigator-based navigation. Use CuxRouterNavigationListener for the router-based setup in the navigation guide.
The observer uses named arguments. The router listener class is not RouterNavigationListener. Keep existing observers and callbacks, and use distinct navigator tags for multiple navigators.
Wrap a destination in DestinationWidget when you need a recognizable name. Test the initial screen, Back navigation and the current screen after collection resumes.
Users or events are missing
Use the named arguments in setUserProperties(userId: ..., params: ...) and trackEvent(eventName: ..., params: ..., label: ...). Parameters use string keys and values.
Check initialization and collection state. Run the users and events verification with synthetic accounts. Check repeated callbacks and account switching separately.
Sensitive content is visible
Wrap the sensitive widget or region in MaskingWidget. Check it after scrolling, loading new content and changing layouts. Do not assume native input-type handling protects every Flutter widget.
Masking hides screenshot content; it does not filter identifiers or event parameters. Review the collection and masking guide before repeating the test.
Prepare a support report
Include the package version, Flutter/Dart versions, resolved dependencies, device, operating system, navigation setup and steps to reproduce with synthetic data. Describe the expected result and what appears in CUX.
Do not share project tokens, credentials or customer data.