Transmit class

Main Transmit client class.

Constructors

Transmit(TransmitOptions options)
Create a new Transmit client.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isConnected → bool
Returns whether the client is currently connected.
no setter
isReconnecting → bool
Returns whether the client is currently reconnecting.
no setter
nextRetryTime → DateTime?
Returns the timestamp when the next reconnect attempt will occur, or null if not reconnecting.
no setter
reconnectAttempts → int
Returns the current number of reconnect attempts.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusStream → Stream<TransmitStatus>
Returns the status stream.
no setter
uid → String
Returns the unique identifier of the client.
no setter

Methods

close() → void
Close the connection.
getHeaders() → Map<String, String>
Get the current headers that are set via setHeaders.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on(String event, void callback()) → StreamSubscription<TransmitStatus>
Listen to status events.
reconnect() → Future<void>
Force a reconnection attempt. This will cancel any pending reconnect timer and immediately attempt to reconnect.
setHeaders(Map<String, String>? headers) → void
Set headers that will be included in all HTTP requests. Useful for setting authentication headers when user logs in/out. headers - Map with header key-value pairs, or null to clear headers
subscription(String channel) → Subscription
Create or get a subscription for a channel.
toString() → String
A string representation of this object.
inherited

Operators

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