RawSlideCountdown constructor

const RawSlideCountdown({
  1. required StreamDuration streamDuration,
  2. required RawSlideCountdownBuilder builder,
  3. Key? key,
})

A widget that displays a countdown based on a StreamDuration.

The RawSlideCountdown widget listens to the streamDuration.durationLeft stream and updates its display based on the received duration values.

The builder function is used to build the widget based on the current BuildContext and the remaining Duration received from the stream.

Example:

RawSlideCountdown(
  streamDuration: myStreamDuration,
  builder: (BuildContext context, Duration remainingDuration) {
    return RawDigitItem(
        duration: remainingDuration,
        timeUnit: TimeUnit.seconds,
        digitType: DigitType.second,
        countUp: false,
    );
  },
)

In the above example, the RawSlideCountdown widget listens to the myStreamDuration.durationLeft stream and updates the displayed text based on the remaining duration.

See also:

Implementation

const RawSlideCountdown({
  required this.streamDuration,
  required this.builder,
  super.key,
});