RateLimiter class

Rate limiter to prevent exceeding API rate limits

Constructors

RateLimiter(int maxRequestsPerMinute)
Creates a rate limiter with max requests per minute

Properties

currentRequestCount int
Gets the number of requests made in the current window
no setter
hashCode int
The hash code for this object.
no setterinherited
maxRequestsPerMinute int
Maximum number of requests allowed per minute
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeUntilNextRequest Duration?
Gets the time remaining until the next request is allowed
no setter

Methods

allowRequest() bool
Checks if a request is allowed based on rate limit
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets the rate limiter
toString() String
A string representation of this object.
override

Operators

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