skip_with_time 0.1.0 copy "skip_with_time: ^0.1.0" to clipboard
skip_with_time: ^0.1.0 copied to clipboard

Dart 1 only

A stream transformer that skips all events before a specified duration.

Skip With Time #

A stream transformer that skips all events before a specified duration.

Example #

import 'dart:async';
import 'package:skip_with_time/skip_with_time.dart';

main() {
  var controller  = new StreamController();
  var transformer = new SkipWithTime(new Duration(seconds: 5));
  var skipped     = controller.stream.transform(transformer);

  // print the events that we didn't skip
  skipped.listen(print);

  new Timer.periodic(new Duration(seconds: 1), (_) {
    controller.add("Stream all the things!!");
  });
}
0
likes
25
pub points
0%
popularity

Publisher

unverified uploader

A stream transformer that skips all events before a specified duration.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on skip_with_time