Attribute class
A user attribute for UserX.applyUserAttributes.
Create one with a factory: a plain value (Attribute.bool, Attribute.int, Attribute.double, Attribute.string) or a counter (Attribute.counter, Attribute.increasedCounter, Attribute.decreasedCounter).
Constructors
- Attribute.bool(String name, {required bool value})
-
Sets a boolean attribute.
factory
- Attribute.counter(String name, {int value = 0})
-
Sets a counter to
value.factory - Attribute.decreasedCounter(String name, {int decValue = 1})
-
Decreases a counter by
decValue.factory - Attribute.double(String name, {required double value})
-
Sets a floating-point attribute.
factory
- Attribute.increasedCounter(String name, {int incValue = 1})
-
Increases a counter by
incValue.factory - Attribute.int(String name, {required int value})
-
Sets an integer attribute.
factory
- Attribute.string(String name, {required String value})
-
Sets a string attribute.
factory
Properties
- action → AttributeAction
-
What to do with the stored value.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → AttributeKind
-
Plain value or counter.
final
- name → String
-
Attribute name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → dynamic
-
Attribute value, or the counter step.
final
- valueType → AttributeValueType
-
Type of value.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Serialized form passed to the native SDK.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited