IfShouldTickAndRebuild typedef

IfShouldTickAndRebuild = bool Function({required DateTime currentTime, required DateTime initialTime, required DateTime? lastTickTime, required int ticks})

You should return true if the TimeBuilder should tick and rebuild. Or return false if it should NOT tick nor rebuild.

Implementation

typedef IfShouldTickAndRebuild = bool Function({
//
  /// The current time.
  required DateTime currentTime,

  /// The time of the last tick (is `null` for the first tick).
  required DateTime? lastTickTime,

  /// The time when the [TimeBuilder] was created.
  required DateTime initialTime,

  /// The number of ticks since the [TimeBuilder] was created.
  required int ticks,
});