RudderController class

Main controller class for the RudderStack Flutter SDK.

This class provides a unified interface for tracking events, identifying users, and managing analytics data. It acts as a singleton controller that delegates calls to the appropriate platform implementations.

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

alias(String newId, {RudderOption? options}) → void
Creates an alias for the current user with a newId.
endSession() → void
Manually ends the current user session.
getRudderContext() Future<Map?>
Retrieves the current RudderStack context information.
getSessionId() Future<int?>
Retrieves the current session ID.
group(String groupId, {RudderTraits? groupTraits, RudderOption? options}) → void
Associates the current user with a group.
identify(String userId, {RudderTraits? traits, RudderOption? options}) → void
Identifies a user with the given userId and optional traits.
initialize(String writeKey, {RudderConfig? config, RudderOption? options}) → void
Initializes the RudderStack SDK with the provided write key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optOut(bool optOut) → void
Sets the opt-out status for the current user.
putAdvertisingId(String advertisingId) → void
Sets the advertising ID for the current device.
putAnonymousId(String anonymousId) → void
Sets a custom anonymous ID for the current user.
putDeviceToken(String deviceToken) → void
Sets the device token for push notifications.
reset({bool clearAnonymousId = false}) → void
Resets the user identity and clears stored user data.
screen(String screenName, {String? category, RudderProperty? properties, RudderOption? options}) → void
Records a screen view with the given screenName.
startSession({int? sessionId}) → void
Manually starts a new user session.
toString() String
A string representation of this object.
inherited
track(String eventName, {RudderProperty? properties, RudderOption? options}) → void
Tracks an event with the given eventName and optional properties.

Operators

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

Static Properties

instance RudderController
Returns the singleton instance of RudderController.
no setter