Context class

Context class for network operations

Constructors

Context({Duration? timeout})
Creates a new Context

Properties

done → Future<void>
Future that completes when the context is done
no setter
hashCode → int
The hash code for this object.
no setterinherited
isDone → bool
Whether the context is done
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel([Object? reason]) → void
Cancel the context
getAllowLimitedConn() → (bool, String)
Gets the allow limited connection option from the Context
getDialPeerTimeout() → Duration
Gets the dial peer timeout from the Context
getForceDirectDial() → (bool, String)
Gets the force direct dial option from the Context
getNoDial() → (bool, String)
Gets the no dial option from the Context
getSimultaneousConnect() → (bool, bool, String)
Gets the simultaneous connect option from the Context
getUseTransient() → (bool, String)
Gets the use transient option from the Context
getValue(Object key) → Object?
Gets a value from the Context
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
withAllowLimitedConn(String reason) → Context
Creates a new Context with the allow limited connection option
withDialPeerTimeout(Duration timeout) → Context
Creates a new Context with the dial peer timeout
withForceDirectDial(String reason) → Context
Creates a new Context with the force direct dial option
withNoDial(String reason) → Context
Creates a new Context with the no dial option
withSimultaneousConnect(bool isClient, String reason) → Context
Creates a new Context with the simultaneous connect option
withUseTransient(String reason) → Context
Creates a new Context with the use transient option
withValue(Object key, Object? value) → Context
Creates a new Context with a value

Operators

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

Constants

dialPeerTimeout → const Duration
Default timeout for a single call to DialPeer