RealtimeService class

The service that handles the Realtime APIs.

Usually shouldn't be initialized manually and instead PocketBase.realtime should be used.

Constructors

RealtimeService.new(PocketBase client)

Properties

client PocketBase
no setterinherited
clientId String
Returns the established SSE connection client id (if any).
no setter
hashCode int
The hash code for this object.
no setterinherited
onDisconnect ↔ void Function(Map<String, List<SubscriptionFunc>>)?
An optional hook that is invoked when the realtime client disconnects either when unsubscribing from all subscriptions or when the connection was interrupted or closed by the server.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subscribe(String topic, SubscriptionFunc listener, {String? expand, String? filter, String? fields, Map<String, dynamic> query = const {}, Map<String, String> headers = const {}}) Future<UnsubscribeFunc>
Register the subscription listener.
toString() String
A string representation of this object.
inherited
unsubscribe([String topic = ""]) Future<void>
Unsubscribe from all subscription listeners with the specified topic.
unsubscribeByPrefix(String topicPrefix) Future<void>
Unsubscribe from all subscription listeners starting with the specified topic prefix.
unsubscribeByTopicAndListener(String topic, SubscriptionFunc listener) Future<void>
Unsubscribe from all subscriptions matching the specified topic and listener function.

Operators

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