Segment class

Entry point for interacting with Segment analytics.

Use this class to configure Segment, track events, identify users, and manage analytics integrations.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

getAnonymousId Future<String?>
no setter

Static Methods

alias({required String alias, Map<String, dynamic>? options}) Future<void>
Creates an alias between two user identities.
config({required SegmentConfig options}) Future<void>
Configures the Segment SDK.
debug(bool enabled) Future<void>
disable() Future<void>
enable() Future<void>
flush() Future<void>
group({required String groupId, Map<String, dynamic>? traits, Map<String, dynamic>? options}) Future<void>
Associates a user with a group in Segment.
identify({String? userId, Map<String, dynamic>? traits, Map<String, dynamic>? options}) Future<void>
Identifies a user in Segment.
reset() Future<void>
screen({required String screenName, Map<String, dynamic>? properties, Map<String, dynamic>? options}) Future<void>
Records a screen view in Segment.
setContext(Map<String, dynamic> context) Future<void>
track({required String eventName, Map<String, dynamic>? properties, Map<String, dynamic>? options}) Future<void>
Tracks an event in Segment.