flex_track 2.0.0
flex_track: ^2.0.0 copied to clipboard
A flexible analytics tracking system for Flutter with intelligent routing, GDPR compliance, and multi-platform support
2.0.0 #
Breaking changes #
BaseEvent.getName() and BaseEvent.getProperties() have been removed. Event implementations must now override the name and properties getters.
Before:
class PurchaseEvent extends BaseEvent {
@override
String getName() => 'purchase';
@override
Map<String, Object>? getProperties() => {'amount': 29.99};
}
After:
class PurchaseEvent extends BaseEvent {
@override
String get name => 'purchase';
@override
Map<String, Object>? get properties => {'amount': 29.99};
}
Added #
- Add an
EventTransformerpipeline for enriching and normalizing events before routing and dispatch. - Add
EnrichedEventfor layering additional properties onto an event while preserving its routing, consent, and privacy metadata. - Add support for custom event categories and subcategories.
- Add the interactive FlexTrack guide at flextrack.taghizadeh.dev.
Changed #
- Replace
BaseEvent.getName()andBaseEvent.getProperties()with theBaseEvent.nameandBaseEvent.propertiesgetter API. - Update examples, tests, and documentation to use the getter API.
Fixed #
- Align transformer signatures around
BaseEventso transformed events flow consistently through clients, widgets, routing, and trackers.
1.0.1 #
- Improve package presentation and pub.dev listing metadata.
- Add screenshot entries in
pubspec.yamlfor logo and banner assets. - README improvements and image path fixes for inspector demo rendering.
1.0.0 #
This release promotes the package to 1.0.0 and focuses on injectable analytics, widget ergonomics, local debugging, and documentation.
New features #
FlexTrackScope—InheritedWidgetthat provides aFlexTrackClientto descendant widgets.FlexClickTrack,FlexImpressionTrack,FlexMountTrack, andFlexTrackRouteViewMixinresolve the client in order: scoped client →FlexTrack.track(if set up) → no-op.- Shared widget dispatch —
dispatchFlexTrackWidgetTrackcentralizes scoped/global dispatch andFlutterErrorreporting (FlexTrackWidgetSurfacefor stable error labels). FlexTrackClient— create and own a client withFlexTrackClient.create/createWithRouting; optionaleventDispatchStream/debugStateStreamin debug for tooling.- FlexTrack Inspector (IO platforms) — optional
package:flex_track/flex_track_inspector.dartstarts a local dashboard (default port 7788); console logsFlexTrack Inspector (open in browser): http://127.0.0.1:7788. No-op on Flutter Web.
Widgets & examples #
- Examples —
examples/static_app(FlexTrackScopewithFlexTrack.instance.client),examples/riverpod_app(scoped client without globalsetup),examples/bloc_getit_app, flagshipexample/with inspector wiring in debug. - Tests — expanded coverage for clients, trackers, routing presets, inspector helpers, and scope vs global behavior for all tracking widgets.
Documentation #
- README:
FlexTrackClient,FlexTrackScope, inspector section, table of contents. docs/flex-track-client.md— injectable client, Riverpod/Bloc, widget scope behavior.docs/assets/inspector.gif— demo of the inspector with the flagship app.
0.1.1 #
- Documentation updates based on community feedback.
0.1.0 #
- Initial release on pub.dev.
- Intelligent event routing, GDPR-oriented helpers, built-in trackers (Console, NoOp, Mock), performance presets, and debugging APIs.