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