LDContextBuilder class Null safety

A builder to facilitate the creation of LDContexts. Note that the return type of kind is a LDAttributesBuilder that is used to define attributes for the specific kind of context you are creating.

LDContextBuilder builder = LDContextBuilder();
builder.kind('user', 'user-key-123abc').name('Sandy Smith').set('employeeID', LDValue.ofString('ID-1234'));
builder.kind('company', 'company-key-123abc').name('Microsoft');
LDContext context = builder.build();

Constructors

LDContextBuilder()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

build() LDContext
Builds the context.
kind(String kind, [String? key]) LDAttributesBuilder
Adds another kind to the context. kind and optional key must be non-empty. Calling this method again with the same kind returns the same LDAttributesBuilder as before.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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