increment method

void increment([
  1. int byValue = 1
])

Increment the counter by a given value (default is 1)

Implementation

void increment([int byValue = 1]) {
  value += byValue;
}