Throttle<T> extension

on
  • T? Function()

Methods

throttle({String? tag, Duration duration = const Duration(seconds: 1)}) → void

Available on T? Function(), provided by the Throttle extension

Throttles the execution of the function. The function can only be called once within the specified duration. If the function is called again within the duration, it will be ignored. tag can be used to differentiate between different throttled functions. If no tag is provided, the hash code of the function will be used.