throttle function
Implementation
throttle(
Future Function() func,
) {
bool enable = true;
Function target = () {
if (enable == true) {
enable = false;
func().then((_) {
enable = true;
});
}
};
return target;
}