SingleResponseChannel<R> class
A Future and a SendPort that can be used to complete the future.
The first value sent to port is used to complete the result.
All following values sent to port
are ignored.
Constructors
-
SingleResponseChannel({FutureOr<
R> callback(dynamic value)?, Duration? timeout, bool throwOnTimeout = false, FutureOr<R> onTimeout()?, R? timeoutValue}) - Creates a response channel.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- port → SendPort
-
The port expecting a value that will complete result.
no setter
-
result
→ Future<
R?> -
Future completed by the first value sent to port.
Null is only possible with null timeoutValue and
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
interrupt(
[R? result]) → void - If the channel hasn't completed yet, interrupt it and complete the result.
-
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