lerix_flutter 0.4.0 or later. Everything on this page works on
iOS, Android, macOS, Windows and the web. For what each module does and what
you see in the dashboard, read Feedback,
NPS surveys and Analytics.
Setup
Two additions to the app you set up in Installation:- Put
LerixFeedbackabove yourMaterialApp. It hosts the feedback flow and the NPS sheet, and costs nothing while they’re closed. - Add
LerixNavigatorObserverto your navigator so screen views are recorded.
main.dart
GoRouter instead:
Init options
Lerix.init takes two optional parameters for these modules:
In-app feedback
Open the flow from anywhere belowLerixFeedback, for example from a “Send
feedback” button:
show() returns a LerixFeedbackResult:
Options
Labels, the email mode and the screenshot mode come from the dashboard. Override them for one call withLerixFeedbackOptions:
Lerix.feedback.setUserEmail('user@example.com')
once the user signs in.
Hide sensitive widgets
Wrap anything that must not appear in a screenshot inLerixConfidential. It
is painted over before the image is created.
Your own UI
Send feedback from your own form withsubmit. Screenshots are PNG, JPEG or
WebP bytes, up to 5 MB each.
Look and language
The flow follows your app’s theme (light or dark, primary colour). English and Arabic (right to left) are built in, and other languages fall back to English.NPS survey
CallmaybeShowNps at a calm moment, for example when the home screen
appears. It returns true when the survey was shown.
debugMode: true, the console says why a survey was skipped.
Analytics
$first_open,$session_start/$session_end,$app_updateand$screen_vieware recorded automatically.- Screen names come from the route’s name:
GoRoute.name, or thenameinRouteSettings/MaterialPage. Unnamed routes, dialogs and bottom sheets are skipped.LerixNavigatorObserver(includePopups: true)also reports named popups, andnameExtractorlets you name routes yourself. Lerix.tracknever throws and can be called beforeLerix.init. Invalid names and properties are dropped and logged in debug mode.- Events are stored on the device and sent in batches.
Call
Lerix.setUser after sign-in. Analytics
then counts the person across devices, and you can reply to their feedback by
push.