EasyThrottle class

Ensures a function is called at most once in a specified period.

Useful for preventing double-clicks on buttons.

Constructors

EasyThrottle({required Duration duration})

Properties

duration Duration
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(VoidCallback action) → void
Runs the action only if the throttle duration has passed since the last run.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited