copyWithBoolAttribute method

Attributes copyWithBoolAttribute(
  1. String name,
  2. bool value
)

Creates a new Attributes instance with a Boolean attribute added or updated.

@param name The attribute key @param value The Boolean value @return A new Attributes instance with the added/updated attribute

Implementation

Attributes copyWithBoolAttribute(String name, bool value) {
  return AttributesCreate.create([
    ..._entries.values,
    AttributeCreate.create<bool>(name, value),
  ]);
}