RestartableTimer constructor Null safety
- Duration _duration,
- ZoneCallback _callback
Creates a new timer.
The callback
function is invoked after the given duration
. Unlike a
normal non-periodic Timer, callback
may be called more than once.
Implementation
RestartableTimer(this._duration, this._callback)
: _timer = Timer(_duration, _callback);