MockAnalyticsService class

Records AnalyticsService calls for assertions.

Implemented types

Constructors

MockAnalyticsService()

Properties

events List<String>
final
hashCode int
The hash code for this object.
no setterinherited
params List<Map<String, Object?>>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId String?
getter/setter pair
userProperties Map<String, String?>
final

Methods

log(String event, [Map<String, Object?> eventParams = const {}]) → void
Records that event happened.
override
logged(String event) bool
Whether event was logged at least once.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setUserId(String? id) → void
Associates subsequent events with id, or clears it on sign-out.
override
setUserProperty(String name, String? value) → void
Sets a durable property on the current user (plan tier, cohort, locale).
override
toString() String
A string representation of this object.
inherited

Operators

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