increment method Null safety

void increment(
  1. int addend
)

Increases the value by the addend.

Implementation

void increment(int addend) {
  assert(addend >= 0);
  _value += addend;
}