increment method

PNCounter increment(
  1. String replicaId, [
  2. int amount = 1
])

Implementation

PNCounter increment(String replicaId, [int amount = 1]) {
  final newP = Map<String, int>.from(_p);
  newP[replicaId] = (newP[replicaId] ?? 0) + amount;
  return PNCounter(p: newP, n: _n);
}