throttleOnTapIfNeeded method
Implementation
@protected
VoidCallback? throttleOnTapIfNeeded() {
if (widget.isEnabled) {
if (widget.shouldTrottleTime) {
subscribeToTrottlerEvents();
return () => trottler.add(widget.onTap);
}
unsubscribeToTrottlerEventsIfNeeded();
return widget.onTap;
}
unsubscribeToTrottlerEventsIfNeeded();
return null;
}