Analytics class

Mixed in types

Constructors

Analytics(Configuration config, Store _store, {HTTPClient httpClient(Analytics)?})

Properties

hashCode int
The hash code for this object.
no setterinherited
httpClient HTTPClient
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state StateManager
no setter
store Store
no setter

Methods

addFlushPolicy(List<FlushPolicy> policies) → void
Adds a FlushPolicy to the list @param policies policies to add
addPlugin(Plugin plugin, {Map<String, dynamic>? settings}) → void
Adds a new plugin to the currently loaded set. @param {{ plugin: Plugin, settings?: IntegrationSettings }} Plugin to be added. Settings are optional if you want to force a configuration instead of the Segment Cloud received one
alias(String newUserId) Future
override
cleanup() Future<void>
error(Exception exception) → void
flush() Future
override
getFlushPolicies() List<FlushPolicy>
Returns the current enabled flush policies
getPlugins(PluginType? ofType) List<Plugin>
group(String groupId, {GroupTraits? groupTraits}) Future
override
identify({String? userId, UserTraits? userTraits}) Future
override
init() Future
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onContextLoaded(void callback(ContextUpdateType)) → void Function()
Registers a callback for when the client has loaded the device context. This happens at the startup of the app, but it is handy for plugins that require context data during configure as it guarantees the context data is available.
onPluginLoaded(void callback(Plugin)) → void Function()
Registers a callback for each plugin that gets added to the analytics client. @param callback Function to call
removeFlushPolicy(List<FlushPolicy> policies) → void
Removes a FlushPolicy from the execution
removePlugin(Plugin plugin) → void
Removes and unloads plugins with a matching name from the system.
reset({bool? resetAnonymousId = true}) Future
override
screen(String name, {Map<String, dynamic>? properties}) Future
override
toString() String
A string representation of this object.
inherited
track(String event, {Map<String, dynamic>? properties}) Future
override

Operators

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

Static Properties

debug bool
getter/setter pair

Static Methods

version() String