stream_duration 4.2.2 copy "stream_duration: ^4.2.2" to clipboard
stream_duration: ^4.2.2 copied to clipboard

A dart package for stream duration, support countdown, countup, and countup infinity.

example/example.dart

import 'package:stream_duration/stream_duration.dart';

void main() {
  /// Countdown
  final streamDuration = StreamDuration(
    config: StreamDurationConfig(
      autoPlay: false,
      countDownConfig: CountDownConfig(
        duration: Duration(seconds: 10),
      ),
      onDone: () => print('Stream Done 👍'),
    ),
  );

  streamDuration.play();

  // Change duration
  // streamDuration.change(const Duration(seconds: 10));
  streamDuration.durationLeft.listen(
    (duration) {
      print('Duration $duration');
    },
  );
}
9
likes
160
points
5.82k
downloads

Publisher

verified publisherfarhanfadila.site

Weekly Downloads

A dart package for stream duration, support countdown, countup, and countup infinity.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on stream_duration