DateTimeLoopBuilder constructor
const
DateTimeLoopBuilder({
- Key? key,
- TimeUnit? timeUnit,
- DateTimeLoopController? controller,
- DateTime getNow()?,
- bool triggerOnStateChange = true,
- required DateTimeLoopWidgetBuilder builder,
- Widget? child,
DateTimeLoopBuilder is a Widget that listens to the system's datetime and triggers a rebuild of its child widget based on the specified time unit. This allows you to create dynamic UI elements that update at regular intervals.
Implementation
const DateTimeLoopBuilder({
super.key,
this.timeUnit,
this.controller,
this.getNow,
this.triggerOnStateChange = true,
required this.builder,
this.child,
}) : assert(controller != null || timeUnit != null,
'Either controller or timeUnit must be provided.');