SimplyticsAnalyticsServiceGroup class
A class that allows you to use multiple analytics services at the same time.
Example:
Simplytics.setup(
analyticsService: SimplyticsAnalyticsServiceGroup([
SimplyticsDebugAnalyticsService(),
CustomAnalyticsService(),
]),
);
- Inheritance
-
- Object
- SimplyticsAnalyticsInterface
- SimplyticsAnalyticsServiceGroup
Constructors
-
SimplyticsAnalyticsServiceGroup(List<
SimplyticsAnalyticsInterface> services) - Creates an analytics service group, all calls to this group will be propagated to all specified service classes.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnabled → bool
-
Whether the analytics service collects events.
If false, no events is sent to the service.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
services
→ List<
SimplyticsAnalyticsInterface> -
List of service classes to which all calls to this group will be propagated.
final
Methods
-
log(
SimplyticsEvent event) → Future< void> -
Log an
event
class to the analytics service.override -
logEvent(
{required String name, Map< String, Object?> ? parameters}) → Future<void> -
Log an event with the specified event
name
andparameters
to the analytics service.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetAnalyticsData(
) → Future< void> -
Resets all current analytics data.
override
-
routeEnd(
{required String name}) → Future< void> -
Log this event when the user ends viewing the
name
application screen.override -
routeStart(
{required String name, String? screenClassOverride}) → Future< void> -
Log this event when the user starts viewing the application screen
name
(and possiblyscreenClassOverride
).override -
setEnabled(
bool enabled) → Future< void> -
Enables/disables automatic event collection using this service class.
override
-
setUserId(
String? id) → Future< void> -
Sets a user
id
to associate with all app events.override -
setUserProperty(
{required String name, required String? value}) → Future< void> -
Sets the user property named
name
to the givenvalue
.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited