supabase_realtime library

Client library for Supabase Realtime: subscribe to PostgreSQL database changes, broadcast messages, and presence over a websocket connection.

Classes

PostgresChangeFilter
Creates a filter for realtime postgres change listener.
PostgresChangePayload
Data class that contains the Postgres change event payload.
PostgresColumn
A PostgreSQL column description used to convert a change payload's raw string values to their Dart-typed form.
Presence
A single shared state between users with Realtime Presence.
RealtimeChannel
A subscription to a Realtime topic, created with RealtimeClient.channel.
RealtimeChannelConfig
Configuration for a RealtimeChannel's broadcast, presence, and RLS behavior.
RealtimeClient
Manages a persistent WebSocket connection to the Supabase Realtime server.
RealtimeCloseEvent
Event details for when the connection closed.
RealtimeConnectionStatusChange
A connection status change emitted by RealtimeClient.onStatusChange.
RealtimeConstants
Default values used by RealtimeClient.
RealtimeMessage
A message as it travels over the Realtime WebSocket connection.
RealtimePresenceJoinPayload
Payload for PresenceEvent.join callback.
RealtimePresenceLeavePayload
Payload for PresenceEvent.leave callback.
RealtimePresencePayload
Base class for the payloads emitted by the presence streams.
RealtimePresenceSyncPayload
Payload for PresenceEvent.sync callback.
RealtimeSubscribeStatusChange
A subscription status change emitted by RealtimeChannel.onStatusChange.
RealtimeSystemPayload
Payload of a system event emitted by the server.
ReplayOption
Configuration for broadcast replay feature. Allows replaying broadcast messages from a specific timestamp.
SinglePresenceState
A single client connected through presence.

Enums

ChannelResponse
The result of sending a message on a RealtimeChannel, such as a broadcast.
PostgresChangeEvent
The kind of Postgres change a PostgresChangeFilter listens for.
PostgresChangeFilterType
Specifies the type of filter to be applied on realtime Postgres Change listener.
PostgresType
A PostgreSQL column type, as sent in the type field of a column description.
PresenceEvent
The kind of change a presence callback is reporting.
RealtimeConnectionStatus
The status of the WebSocket connection reported by RealtimeClient.onStatusChange.
RealtimeHeartbeatStatus
The lifecycle status of a heartbeat reported to RealtimeClient.onHeartbeat.
RealtimeLogLevel
The verbosity of logging the Realtime server does for a connection, sent as the log_level connection parameter.
RealtimeProtocolVersion
The wire protocol version negotiated with the Realtime server.
RealtimeSubscribeStatus
The status of a RealtimeChannel.subscribe call.
SocketState
The connection state of a RealtimeClient's underlying socket.

Typedefs

RealtimeDecode = Future<RealtimeMessage> Function(Object frame)
Deserializes a raw incoming WebSocket frame (String or binary) into a message.
RealtimeEncode = Future<Object> Function(RealtimeMessage message)
Serializes an outgoing message into the String or binary frame written to the WebSocket.
TimerCalculation = Duration Function(int tries)
Returns the delay before the next retry, given the number of tries so far.
WebSocketTransport = WebSocketChannel Function(String url, Map<String, String> headers)
Opens the WebSocket connection used by a RealtimeClient.