copyWithDoubleAttribute method

Attributes copyWithDoubleAttribute(
  1. String name,
  2. double value
)

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

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

Implementation

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