checkInterval method

bool checkInterval(
  1. String key,
  2. int intervalInMilli,
  3. double dt
)

Returns true if for each time the defined millisecond interval passes. Like a Timer.periodic Used in flows involved in the update

Implementation

bool checkInterval(String key, int intervalInMilli, double dt) {
  if (this._timers[key]?.interval != intervalInMilli) {
    this._timers[key] = IntervalTick(intervalInMilli);
    return true;
  } else {
    return this._timers[key]?.update(dt) ?? false;
  }
}