DynamicVar class sealed
Represents a dynamic variable for session segmentation in Contentsquare analytics.
Each dynamic variable consists of:
- A key (String, max 50 characters)
- Either an
intValue(0 to 2³² - 1) orstringValue(max 255 characters)
Usage:
// Create with string value
final userType = DynamicVar.fromString('accountType', 'Premium');
// Create with integer value
final friendCount = DynamicVar.fromInt('numberOfFriends', 15);
Constructors
- DynamicVar.fromInt({required String key, required int value})
-
factory
- DynamicVar.fromString({required String key, required String value})
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
The key that identifies this dynamic variable (max 50 characters).
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String - Returns a string representation of the dynamic variable.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited