EventTracker class
Responsible for tracking custom in-app events and managing the offline queue.
This tracker handles immediate event submission and falls back to a persistent EventQueue when the network is unavailable or requests fail.
- Implemented types
Constructors
- EventTracker({required NetworkManagerProtocol networkManager, required StorageManagerProtocol storageManager, required AttributionContext attributionContext, EventQueue? eventQueue})
- Creates an event tracker
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- queuedEventCount → int
-
Returns the number of queued events
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearQueue(
) → void -
Clears the event queue
override
-
flushQueue(
) → Future< void> -
Flushes the event queue, attempting to send all queued events
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
trackEvent(
String name, [Map< String, dynamic> ? properties]) → Future<void> -
Tracks a custom event
override
-
trackRevenue(
{required double amount, required String currency, Map< String, dynamic> ? properties}) → Future<void> -
Tracks a revenue-generating event.
override
-
trackScreenView(
String name, [Map< String, dynamic> ? properties]) → Future<void> -
Tracks a screen view.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited