debounce method
Every time that the Rx<T> changes the callback
will be called after a delay.
Implementation
RxReaction debounce(Duration delay, void Function(T) callback) {
final debouncer = Debouncer(delay);
// ignore: cancel_subscriptions
final StreamSubscription subscription = stream.listen((event) {
debouncer.call(() {
callback(event);
});
});
return RxReaction(subscription, debouncer);
}