throttle function
TopLevel lambda to create Throttle functions.
Implementation
Throttle throttle(
Function func,
Duration wait, {
bool leading = true,
bool trailing = true,
}) =>
Throttle(
func,
wait,
leading: leading,
trailing: trailing,
);