RealtimeSubscription class

Realtime Subscription

Constructors

RealtimeSubscription({required Future<void> close(), required Future<void> unsubscribe(), required Future<void> update({List<Object>? channels, List<String>? queries}), required List<String> channels, required List<String> queries, required StreamController<RealtimeMessage> controller})
Initializes a RealtimeSubscription

Properties

channels ↔ List<String>
List of channels
getter/setter pair
close → Future<void> Function()
Alias of unsubscribe that also closes the socket when this was the last active subscription. Prefer unsubscribe plus Realtime.disconnect for explicit control.
final
controller → StreamController<RealtimeMessage>
final
hashCode → int
The hash code for this object.
no setterinherited
queries ↔ List<String>
List of query strings
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stream → Stream<RealtimeMessage>
Stream of RealtimeMessages
final
unsubscribe → Future<void> Function()
Removes this subscription only. The WebSocket stays open so other subscriptions keep receiving events — call Realtime.disconnect() to tear the connection down.
final
update → Future<void> Function({List<Object>? channels, List<String>? queries})
Replace the channels and/or queries on this subscription without recreating it.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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