Push class Null safety

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


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


event PhoenixChannelEvent?
The event name associated with the pushed message
future Future<PushResponse>
A future that will yield the response to the original message.
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.
ref String
The unique identifier of the message used throughout its lifecycle.
replyEvent PhoenixChannelEvent
The event name of the expected reply coming from the Phoenix backend.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sent bool
Indicates whether the push has been sent.
timeout Duration?
The expected timeout, after which the push is considered failed.
read / write


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. [...]
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. [...]
trigger(PushResponse response) → void
Trigger the appropriate waiters and future associated for this push, given the provided response. [...]


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