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