DisposeAfterDurationStrategy class

This strategy set the duration to listen for the internet connection events, the subscription will be closed once the duration elapse

Inheritance

Constructors

DisposeAfterDurationStrategy({required Duration duration, Duration? timeOut, Duration interval = kDefaultInterval, Duration? initialDuration = kDefaultInitialDuration, List<InternetAddress> internetAddresses = kDefaultInternetAddresses})

Properties

disposeOnFirstConnected bool
If true, the strategy will stop observing for internet changes as soon as the device is online
no setterinherited
disposeOnFirstDisconnected bool
If true, the strategy will stop observing for internet changes as soon as the device is offline
no setterinherited
duration Duration
The duration to listen for connection event
final
hashCode int
The hash code for this object.
no setterinherited
hasInternetConnection Future<bool>
The observing strategy is to ping each of the internetAddresses supplied, Using stream.any to check for the first address to connect. Once an address connects, it is assumed that there is internet access and the process stops
no setterinherited
initialDuration Duration?
The initial duration to wait before observing internet access
finalinherited
internetAddresses List<InternetAddress>
A list of internet addresses (with port and timeout) to ping.
getter/setter pairinherited
interval Duration
The interval between periodic observing.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeOut Duration?
The timeout period before a check request is dropped and an address is considered unreachable.
finalinherited

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