copyWithIntAttribute method

Attributes copyWithIntAttribute(
  1. String name,
  2. int value
)

Creates a new Attributes instance with an Integer attribute added or updated.

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

Implementation

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