TimeBuilder.eachSecond constructor
TimeBuilder.eachSecond({
- Key? key,
- int? seconds,
- required TimerWidgetBuilder builder,
Rebuilds each second. For example, this will show a clock that rebuilds each second:
TimerWidget.eachSecond(
builder: (BuildContext context, DateTime now, int ticks)
=> ClockRenderer(dateTime: now);
)
If you pass seconds
it will stop when reaching that number of ticks.
Implementation
TimeBuilder.eachSecond({Key? key, int? seconds, required this.builder})
: ifRebuilds = _eachSecond,
isFinished = _ifFinished(seconds),
super(key: key);