CountdownText constructor

const CountdownText({
  1. Key? key,
  2. required DateTime target,
  3. String format = '{h}:{mm}:{ss}',
  4. TextStyle? style,
  5. TextAlign? textAlign,
  6. VoidCallback? onFinished,
  7. String finishedText = 'Started!',
  8. bool showZeroDays = false,
})

Creates a CountdownText widget.

CountdownText(
  target: event.startsAt,
  format: '{d}d {h}h {m}m {s}s',
  onFinished: () => print('Done!'),
)

Implementation

const CountdownText({
  super.key,
  required this.target,
  this.format = '{h}:{mm}:{ss}',
  this.style,
  this.textAlign,
  this.onFinished,
  this.finishedText = 'Started!',
  this.showZeroDays = false,
});