increment method

void increment()

increment() is a function that increments the value of _time by 1 and then notifies all the listeners that the value of _time has changed

Implementation

void increment() {
  _time++;
  notifyListeners();
}