LDAttributesBuilder class final
A builder for constructing LDContextAttributes
.
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
-
addPrivateAttributes(
List< String> private) → LDAttributesBuilder - Mark additional attributes as private. This will add additional private attributes, it will not replace existing attributes that have been added using addPrivateAttributes. Each string should be in attribute reference format, not literal names.
-
anonymous(
bool anonymous) → LDAttributesBuilder - Sets whether the LDContext is only intended for flag evaluations and should not be indexed by LaunchDarkly.
-
build(
) → LDContext - Builds the context.
-
kind(
String kind, [String? key]) → LDAttributesBuilder - Start building a new context with the given kind.
-
name(
String name) → LDAttributesBuilder - Set the name of the context.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setBool(
String name, bool bool, {bool private = false}) → LDAttributesBuilder -
Sets the attribute with
name
to thebool
provided. Also marks the attribute as private accordingly ifprivate
is provided. -
setNum(
String name, num num, {bool private = false}) → LDAttributesBuilder -
Sets the attribute with
name
to thenum
provided. Also marks the attribute as private accordingly ifprivate
is provided. -
setString(
String name, String string, {bool private = false}) → LDAttributesBuilder -
Sets the attribute with
name
to thestring
provided. Also marks the attribute as private accordingly ifprivate
is provided. -
setValue(
String name, LDValue value, {bool private = false}) → LDAttributesBuilder -
Sets the attribute with
name
to thevalue
provided. Also marks the attribute as private accordingly ifprivate
is provided. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited