lerix_flutter 0.4.0
lerix_flutter: ^0.4.0 copied to clipboard
The official Lerix Flutter SDK: crash reporting, push notifications, in-app feedback, NPS surveys and analytics for Flutter apps on Android, iOS, macOS, Windows and Web.
0.4.0 #
- In-app feedback. Put
LerixFeedbackabove yourMaterialAppand callLerix.feedback.show(context): the app shrinks into a backdrop (its state is kept) and the user writes a message, picks labels, captures and annotates up to 5 screenshots (4 pen colours, 3 sizes, undo/redo), adds an email and reviews Show details, the exact list of fields that will be sent. Labels and modes come from the dashboard (GET /plugin/feedback/config, cached 24 h).Lerix.feedback.submit(...)sends feedback without UI andLerix.feedback.setUserEmail(...)prefills the email.LerixConfidentialmasks widgets in screenshots. The screenshot step is hidden when the renderer can't capture. - NPS survey.
Lerix.surveys.maybeShowNps(context, force:)shows a 0–10 bottom sheet with a follow-up question and thank-you per group. Eligibility (app starts, initial delay, sampling, frequency, dismiss cooldown) is checked on the device with the same algorithm as every Lerix SDK; a dismissal is never counted as an answer. - Analytics.
Lerix.track(name, props),Lerix.screen(name),Lerix.analytics.flush()andLerix.analytics.setEnabled(false). Automatic$first_open,$session_start/$session_end,$app_updateand$screen_view(with the newLerixNavigatorObserver, also for go_router). Events are batched (first flush after 5 s, then every 30 s or at 50 events, and when the app goes to the background) and kept on the device (up to 1 MB / 7 days) until sent. Error reports now carry the session id. - Offline outbox. Feedback and survey responses are written to disk first
and retried with backoff; screenshots are uploaded first and checkpointed. A
401 or 403 never deletes data, and
403 SDK_DISABLEDpauses only the affected feature. Lerix.inittakesenvironment(defaultdevfor debug builds, simulators, emulators and local web hosts, elseprod) andanalytics: LerixAnalyticsOptions(...).Lerix.addBreadcrumb(...): a trail of the last 50 breadcrumbs, attached to feedback.- Theming follows the host app (light/dark and primary colour), with
LerixThemeDataoverrides. English and Arabic (right to left) strings are built in and can be overridden withLerixStrings. - New dependency:
path_provider.
0.3.1 #
- Android: fixed push registration. Google blocked the Firebase
Installations API on the shared Firebase project that the SDK uses to create
device tokens, so
FirebaseMessaging.getToken()failed withAPI_KEY_SERVICE_BLOCKED, the device was never registered andgetDeviceId()stayednull. The SDK now uses a new shared project. Nothing changes in your app or in the dashboard: your own Sender ID and FCM credentials keep working. Update the package and the device registers on its next launch.
0.3.0 #
- Client-side error filtering, two new optional
Lerix.initoptions applied to every report (uncaught Flutter, Dart and zone errors,Lerix.throwError, web):ignoreErrors: List<Pattern>drops matching errors before they are sent. AStringmatches as a case-insensitive substring of the message (empty or whitespace-only strings are ignored); aRegExpmatches withhasMatch.beforeSend: LerixErrorEvent? Function(LerixErrorEvent)sees each report right before it is sent (afterignoreErrors); return it, a modified copy (copyWith), ornullto drop it. If it throws, the original report is sent and the exception is not reported or rethrown.
- A dropped report doesn't call
onError. - Swift Package Manager support for iOS and macOS (
Package.swiftunderios/lerix_flutter/andmacos/lerix_flutter/). CocoaPods keeps working unchanged.
0.2.1 #
- A device that first connected with an SDK version that reported a different
OS (for example
unknownon macOS before 0.2.0) now reconnects and registers as the right platform. The locally cached app config is only reused when its OS matches the current one; before, such a device kept its old platform, so its pushes failed with "Push notifications aren't supported on this platform".
0.2.0 #
- Windows (preview): push notifications through WNS with the Windows App
SDK, using a Microsoft Entra ID app registration added in the dashboard
(Notifications → Settings → Windows). The device's push channel is
created and registered with Lerix on every launch; Windows shows the
notification itself, and a click (including one that launches the app)
reaches
setOnNotificationTapped. Needs Windows 10 2004+ and the Windows App Runtime 1.7. The first build downloads the Windows App SDK from NuGet, so it needs network access. Delivery while the app is closed needs package identity (a sparse package); see the Windows guide. - macOS: push notifications through APNs (same Apple key as iOS), device
details and error reporting. Forward the APNs callbacks from
AppDelegate(see the README). - macOS: the SDK stores its data in the standard keychain, so a sandboxed app doesn't need a Keychain Sharing entitlement.
- iOS and macOS: a failed APNs registration now fails
getDeviceToken()withREGISTRATION_FAILEDinstead of leaving it waiting forever. - Linux push isn't supported yet.
0.1.0 #
Lerix.setUser(externalId, identityHash: ...)andLerix.clearUser()link an install to your own user ID, so one send withexternalUserIdsreaches that person on every device and platform. The ID is kept across re-registration and re-sent automatically.
0.0.2 #
- Web: the Lerix service worker is now registered on its own
/lerix/scope instead of/. At/it was replaced by Flutter'sflutter_service_worker.jsin a defaultflutter build web, so pushes were reported as sent but never shown. A worker left at/by 0.0.1 is removed and its push subscription cancelled; the device resubscribes on the nextinit()(when permission is already granted) and gets a new device id. - Uncaught errors are now sent to Lerix, as critical crashes. The
FlutterError.onError,PlatformDispatcher.onErrorand zone handlers only built the report locally, so automatic capture never reached the dashboard; Flutter's own console output for framework errors is kept. - Web: error reports now include their stack. The browser's JavaScript frames
were parsed as Dart VM frames and all dropped; they are now sent as the
browser wrote them, and Lerix maps them back to Dart files and lines with
the source maps uploaded by
npx @lerix-dev/lerix-cli uploadafterflutter build web --source-maps.
0.0.1 #
Initial release of lerix_flutter, the Lerix Flutter SDK.
- Automatic capture of uncaught Flutter and Dart errors, plus manual
Lerix.throwErrorreporting with type, severity and metadata. - Anonymous user registration per project, with
Lerix.deleteUser()andLerix.reRegisterUser()to recover from a stale or mismatched user id. - Push notifications on iOS (native APNs), Android (FCM, no
google-services.jsonneeded) and Web (VAPID + service worker): permissions, device id / token, foreground and tap callbacks, cold-start tap recovery, topic subscriptions, custom sounds and rich images. - "Unsend" support: a silent follow-up push removes an already-displayed
notification from the device (iOS
removeDeliveredNotifications, AndroidNotificationManager.cancel). Requires theapplication(_:didReceiveRemoteNotification:fetchCompletionHandler:)override inAppDelegate.swift— seeNOTIFICATIONS_SETUP_SIMPLE.md. - Web service worker (
web_sw/lerix-sw.js) now uses the samelerix-*channel, cache and message names the Dart side listens on.