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