increment method

void increment()

Implementation

void increment() {
  counter++;
  print("Counter ${counter}");
  emit(state);
}