PollingService class

Constructors

PollingService({required Future<bool> onPoll(), Duration interval = const Duration(seconds: 3), Duration maxDuration = const Duration(minutes: 1), int maxRetries = 5, VoidCallback? onLimitReached})

Properties

hashCode int
The hash code for this object.
no setterinherited
interval Duration
final
isPolling bool
Check if currently polling
no setter
maxDuration Duration
final
maxRetries int
final
onLimitReached VoidCallback?
final
onPoll Future<bool> Function()
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Dispose resources
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() → void
Start polling
stop() → void
Stop polling
toString() String
A string representation of this object.
inherited

Operators

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