throttle2 method
Implementation
void Function(dynamic value1,dynamic value2) throttle2({int milliseconds = 500}) {
var isAllowed = true;
Timer? throttleTimer;
return (value1,value2,) {
if (!isAllowed) return;
isAllowed = false;
this();
throttleTimer?.cancel();
throttleTimer = Timer(Duration(milliseconds: milliseconds), () {
isAllowed = true;
});
};
}