on method
SupabaseRealtimeClient
on(
- SupabaseEventTypes event,
- void callback(
- SupabaseRealtimePayload payload
Subscribe to realtime changes in your databse.
Implementation
SupabaseRealtimeClient on(
SupabaseEventTypes event,
void Function(SupabaseRealtimePayload payload) callback,
) {
if (_realtime.isConnected() == false) {
_realtime.connect();
}
_subscription = SupabaseRealtimeClient(
_realtime,
_headers,
_schema,
_table,
);
return _subscription.on(event, callback);
}