subscribeToTrottlerEvents method

  1. @protected
void subscribeToTrottlerEvents()

Implementation

@protected
void subscribeToTrottlerEvents() {
  unsubscribeToTrottlerEventsIfNeeded();

  if (widget.isEnabled && widget.shouldTrottleTime) {
    subscriptionStream = trottler
        .throttleTime(widget.trottleTimeDuration)
        .listen((Function onTap) => onTap());
  }
}