subscribeToTrottlerEvents method

  1. @protected
void subscribeToTrottlerEvents()
inherited

Implementation

@protected
void subscribeToTrottlerEvents() {
  unsubscribeToTrottlerEventsIfNeeded();

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