PnCounter class final

Positive/negative counter: the value is the sum of every peer's signed deltas, so concurrent increments on different devices all count.

The field holds a number. Each device accumulates its own positive and negative contributions, and a merge takes the element-wise maximum of the per-device sub-counters. The value can only change through Collection.increment; a put that would set it to a different number throws.

Inheritance

Constructors

PnCounter()
Creates a positive/negative counter type.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tag → String
A stable short identifier persisted in the engine's crdt_type column.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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