RudderClient class

Legacy static wrapper for RudderStack Flutter SDK functionality.

This class provides static methods for backwards compatibility with older versions of the SDK. All methods are deprecated and delegate to the RudderController singleton instance.

For new implementations, use RudderController.instance directly.

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

instance RudderController
Provides access to the RudderController singleton instance.
no setter

Static Methods

alias(String newId, {RudderOption? options}) → void
Creates an alias for the current user with a newId.
getInstance(String writeKey, {RudderConfig? config, RudderOption? options}) → void
Gets an instance of the RudderStack SDK.
getRudderContext() Future<Map?>
Retrieves the current RudderStack context information.
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.
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() → void
Resets the user identity and clears stored user data.
screen(String screenName, {RudderProperty? properties, RudderOption? options}) → void
Records a screen view with the given screenName.
setAdvertisingId(String advertisingId) → void
Sets the advertising ID for the current device.
setAnonymousId(String anonymousId) → void
Sets a custom anonymous ID for the current user.
track(String eventName, {RudderProperty? properties, RudderOption? options}) → void
Tracks an event with the given eventName and optional properties.