RateLimit class

A rolling rate limit which allows maxAttempts in the most recent timeframe.

Constructors

RateLimit({required int maxAttempts, required Duration timeframe})
Creates a new RateLimit instance.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maxAttempts int
The maximum number of attempts allowed within the timeframe.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeframe Duration
The timeframe within which the attempts are allowed.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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