Push class Null safety

Object produced by PhoenixChannel.push to encapsulate the message sent and its lifecycle.

Constructors

Push(PhoenixChannel channel, {PhoenixChannelEvent? event, PayloadGetter? payload, Duration? timeout})
Build a Push message from its content and associated channel. [...]

Properties

event PhoenixChannelEvent?
The event name associated with the pushed message
final
future Future<PushResponse>
A future that will yield the response to the original message.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
payload PayloadGetter?
A getter function that yields the payload of the pushed message, usually a JSON object.
final
ref String
The unique identifier of the message used throughout its lifecycle.
read-only
replyEvent PhoenixChannelEvent
The event name of the expected reply coming from the Phoenix backend.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sent bool
Indicates whether the push has been sent.
read-only
timeout Duration?
The expected timeout, after which the push is considered failed.
read / write

Methods

cancelTimeout() → void
Cancel the scheduled timeout for this push.
clearWaiters() → void
Dispose the set of waiters and future associated with this push.
hasReceived(String status) bool
Returns whether the given status was received from the backend as a reply.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onReply(String status, void callback(PushResponse)) → void
Associate a callback to be called if and when a reply with the given status is received.
resend(Duration? newTimeout) Future<void>
Retry to send the push message. [...]
reset() → void
Reset the scheduled timeout for this push.
send() Future<void>
Send the push message. [...]
startTimeout() → void
Schedule a timeout to be triggered if no reply occurs within the expected time frame.
toString() String
A string representation of this object. [...]
inherited
trigger(PushResponse response) → void
Trigger the appropriate waiters and future associated for this push, given the provided response. [...]

Operators

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