mitr_flutter 0.2.0
mitr_flutter: ^0.2.0 copied to clipboard
Official Flutter SDK for Mitr Analytics — privacy-first, zero-PII event tracking for iOS, Android, desktop, and web.
0.2.0 #
- First release published to pub.dev — install with
flutter pub add mitr_flutterinstead of a git/path dependency. - Fixed the default
baseUrl, which pointed at an unregistered domain (api.mitr.io) and silently sent events nowhere for anyone who didn't override it. It's nowhttps://api.mitranalytics.dev/api/v1. dryRun: trueno longer fires the debug-mode diagnostic ping — it now makes exactly zero network requests, as documented.- Added an
example/app coveringtrack,pageView,identify,reset, andflush. - Released under the MIT license.
- Public API is now
MitrAnalytics.instance(initialize,track,pageView,identify,reset,flush), matching the dashboard's integration snippet. - Added
identify(userId)/reset()with a persisted (SharedPreferences) identity, sotrack/pageViewno longer require auidon every call — an anonymous device id is generated and reused automatically until you identify a real user. - Added
pageView(path)as an explicit convenience method alongside generictrack(eventType, ...). MitrNavigationObserverno longer requires auserIdconstructor argument — callMitrAnalytics.instance.identify()once instead.- Event queue now persists to disk between app launches, so events buffered right before the app is killed aren't lost.
- Fixed a pre-existing bug where
package:webwas imported unconditionally, breaking compilation forflutter testand any non-web target — it's now isolated behind a conditional export. - Fixed doubled/inconsistent debug-log prefixes (e.g.
MITR TRACKING: MITR TRACKING [DEV ERROR]: ...) — internal log calls now route throughMitrLogger.log/.dev/.errorcorrectly instead of re-embedding their own prefix text. - Hardened device-info collection (
os/screen size/locale/device type) so a missing rendered view — possible in some embeddings, headless environments, or very early startup — falls back to safe defaults instead of throwing out ofinitialize()/track()/pageView()and crashing the host app. - Added unit tests covering
MitrClient's batching, forced-immediate flush, offline retry/re-queue, and cross-session queue restoration — previously only exercised viadryRun: true, which skips the network path entirely. - Cleaned up analyzer lints (
dart analyze/pub.dev static analysis now reports zero issues): removed the unnecessarylibrarydeclaration and renamedMitrLogger.darttomitr_logger.dartto match Dart file-naming conventions.
0.0.1 #
- Initial release.