FunctionProxy.debounce constructor
Factory constructor to create a debounced function proxy.
target
: The function to debounce.
key
: An optional unique key to identify the debounced function.
timeout
: The debounce duration in milliseconds (default is 500).
Returns a FunctionProxy instance and immediately applies the debounce logic.
Implementation
factory FunctionProxy.debounce(
Function target, {
String? key,
int timeout = 500,
}) {
return FunctionProxy(target, timeout: timeout)..debounce(uniqueKey: key);
}