IsFinished typedef

IsFinished = bool Function({required DateTime currentTime, required DateTime? lastTime, required int ticks})

Return true to end the timer. Returning true here will generate one last rebuild, and then stop.

Implementation

typedef IsFinished = bool Function({
//
  /// This is the current time.
  required DateTime currentTime,

  /// This is the time of the last tick (may be null for the first tick).
  required DateTime? lastTime,

  /// This is the number of ticks since the timer started.
  required int ticks,
});