AnalyticService class

Class for instantiating analytic service.

WARNING! Do not use this class directly for analytic action sending.

This class provides a way to send analytic action using a set of analytic strategies. To use this class, you should create an instance of it with a set of analytic strategies, and then call the performAction method to send analytic action.

Implemented types

Constructors

AnalyticService.empty({Logger? logger})
Initialize analytic service without strategies.
AnalyticService.withStrategies(Set<AnalyticStrategy<AnalyticAction>> _strategies, {Logger? logger})
Initialize analytic service with strategies.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addStrategy(AnalyticStrategy<AnalyticAction> strategy) → void
Add strategy to analytic service.
clearStrategies() → void
Remove all strategies from analytic service.
contains(AnalyticStrategy<AnalyticAction> strategy) bool
Check if a strategy is contained in the analytic service.
forEach(void action(AnalyticStrategy<AnalyticAction> strategy)) → void
Iterate over all strategies.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performAction(AnalyticAction action) → void
Method of sending sending analytic actions.
override
removeStrategy(AnalyticStrategy<AnalyticAction> strategy) → void
Remove strategy from analytic service.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited