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 the bool provided. Also marks the attribute as private accordingly if private is provided.
setNum(String name, num num, {bool private = false}) LDAttributesBuilder
Sets the attribute with name to the num provided. Also marks the attribute as private accordingly if private is provided.
setString(String name, String string, {bool private = false}) LDAttributesBuilder
Sets the attribute with name to the string provided. Also marks the attribute as private accordingly if private is provided.
setValue(String name, LDValue value, {bool private = false}) LDAttributesBuilder
Sets the attribute with name to the value provided. Also marks the attribute as private accordingly if private is provided.
toString() String
A string representation of this object.
inherited

Operators

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