SupabaseRealtimeProvider class
Supabase implementation of RealtimeSubscriptionProvider.
Uses Supabase's native PostgreSQL LISTEN/NOTIFY mechanism via WebSocket for efficient real-time change notifications.
Example setup:
import 'package:supabase_flutter/supabase_flutter.dart';
final provider = SupabaseRealtimeProvider(
client: Supabase.instance.client,
postgresChangeEventAll: PostgresChangeEvent.all,
);
- Implemented types
Constructors
- SupabaseRealtimeProvider({required dynamic client, required dynamic postgresChangeEventAll, Duration connectionTimeout = const Duration(seconds: 30)})
Properties
- client → dynamic
-
Supabase client instance (dynamic to avoid hard dependency).
final
-
connectionStatusStream
→ Stream<
bool> -
Underlying connection status stream.
no setteroverride
- connectionTimeout → Duration
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Check if subscription is currently connected.
no setteroverride
- postgresChangeEventAll → dynamic
-
The
PostgresChangeEvent.allenum value frompackage:supabase_flutter.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Close all subscriptions and cleanup resources.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subscribe(
String table) → Stream< RealtimeChangeEvent> -
Subscribe to real-time changes for a table.
Returns a stream of RealtimeChangeEvent.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited