throttle3<T, E, G> method
Implementation
void Function(T t, E e, G g) throttle3<T, E, G>({int milliseconds = 500}) {
var isAllowed = true;
Timer? throttleTimer;
return (t, e, g) {
if (!isAllowed) return;
isAllowed = false;
this(t,e,g);
throttleTimer?.cancel();
throttleTimer = Timer(Duration(milliseconds: milliseconds), () {
isAllowed = true;
});
};
}