PhoenixChannel class Null safety

Bi-directional and isolated communication channel shared between differents clients through a common Phoenix server.

Constructors

PhoenixChannel.fromSocket(PhoenixSocket socket, {required String topic, Map<String, dynamic>? parameters, Duration? timeout})
Build a PhoenixChannel from a PhoenixSocket.

Properties

canPush bool
Whether the channel can send messages.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
joinRef String
Unique identifier of the 'join' push message.
read-only
loggerName String
The name of the logger associated to this channel.
read-only
messages Stream<Message>
Stream of all messages coming through this channel from the backend.
read-only
parameters Map<String, dynamic>
Parameters passed to the backend at join time.
final
pushBuffer List<Push>
A list of push to be sent out once the channel is joined.
final
reference String
This channel's unique numeric reference.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
socket PhoenixSocket
The PhoenixSocket through which this channel is established.
final
state PhoenixChannelState
State of the channel.
read-only
topic String
The name of the topic to which this channel will bind.
final

Methods

close() → void
Close this channel. [...]
join([Duration? newTimeout]) Push
Join this channel using the associated PhoenixSocket.
leave({Duration? timeout}) Push
Leave this channel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onPushReply(PhoenixChannelEvent replyEvent) Future<Message>
Returns a future that will complete (or throw) when the provided reply arrives (or throws).
push(String eventName, Map<String, dynamic> payload, [Duration? newTimeout]) Push
Push a message to the Phoenix server.
pushEvent(PhoenixChannelEvent event, Map<String, dynamic> payload, [Duration? newTimeout]) Push
Push a message with a valid PhoenixChannelEvent name. [...]
toString() String
A string representation of this object. [...]
inherited
trigger(Message message) → void
Trigger the reception of a message.
triggerError(PhoenixException error) → void
Trigger an error on this channel.

Operators

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