nn_counter_tracker 0.3.0
nn_counter_tracker: ^0.3.0 copied to clipboard
Lightweight, highly customizable analytics-style tracking for Flutter widgets: views, impressions, taps, clicks and user interactions. Works like a mini analytics SDK while staying simple and develope [...]
Changelog #
All notable changes to this project are documented here. This project adheres to Semantic Versioning.
0.2.0 #
Changed #
- Plugin-free core. The default storage is now the pure-Dart
MemoryCounterStorage, and the package no longer depends onshared_preferencesorhive. This lets the package (and apps consuming it) build on every platform — including Windows without Developer Mode — with no native-plugin symlink requirement. - Lowered SDK constraints to Dart
>=3.0.0and Flutter>=3.0.0.
Removed #
SharedPreferencesCounterStorageandHiveCounterStorageare no longer bundled (they pulled in native plugins). Ready-to-copy adapters are documented in the README for apps that want persistence.
Migration #
- Zero-config usage is unchanged. For persistence, add
shared_preferences(or your backend) to your app and pass aCounterStoragetoCounterTrackerService.configure(storage: ...)— see the README.
0.1.0 #
Initial release.
Added #
CounterDataimmutable model withfromJson/toJson/copyWith/equality.CounterStorageabstraction with two implementations:SharedPreferencesCounterStorage(default).HiveCounterStorage(optional).
CounterTrackerServicesingleton with in-memory caching, per-idValueListenables and a broadcastupdatesstream.CounterAnalyticsstatic facade (getCounter,getViews,getClicks,getAllCounters,clear).- Widgets:
CounterViewTracker,CounterClickTracker,CounterTracker,CounterBuilder. - Configurable
visibilityThreshold,cooldownDuration,enableLogs,trackView,trackClick. - Example app with product cards, promotions, coupons, banners and an analytics dashboard.
- Unit and widget tests.