HotlineSubscription class Null safety
A subscription instance for handling channel-specific messages
Constructors
- HotlineSubscription(String identifier, HotlineSubscriptionManager subscriptionManager, {required Function onReceived, required Function onConfirmed, Function? onUnsubscribed, Function? onRejected})
Properties
- cancelledBySubscriptionManager ← bool
-
write-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- identifier ↔ String
-
read / write
- onConfirmed ↔ Function
-
read / write
- onReceived ↔ Function
-
required subscription callbacks
read / write
- onRejected ↔ Function?
-
read / write
- onUnsubscribed ↔ Function?
-
optional subscription callbacks
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- state ↔ HotlineSubscriptionRequestState
-
read / write
- stateType ← HotlineSubscriptionRequestState
-
set the state of this subscription
write-only
- subscriptionManager ↔ HotlineSubscriptionManager
-
read / write
Methods
-
confirmed(
) → void - called by the Hotline connection dispatcher
-
handleResponse(
Map payload) → void - determine how to handle this response and call the relevant handler...
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
perform(
String action, [Map< String, dynamic> ? params]) → void -
send a message to a WebSocket channel on the server to its corresponding channel
action
-
rejected(
) → void - the subscription request was not granted
-
toString(
) → String -
A string representation of this object. [...]
inherited
-
unsubscribe(
) → void - stop receiving messages for this channel
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited