EventxxDebounce_c<T>.fromMyStream constructor

EventxxDebounce_c<T>.fromMyStream({
  1. required Streamxx_c<T> stream,
  2. required Duration time,
  3. required void onListen(
    1. T val
    ),
  4. bool fastFirstRun = false,
})

Implementation

EventxxDebounce_c.fromMyStream({
  required Streamxx_c<T> stream,
  required this.time,
  required this.onListen,
  this.fastFirstRun = false,
}) {
  stream.addListener((value, _) {
    notify(value);
  });
}