Skip to content

A dart client for Supabase Realtime server.

License

Notifications You must be signed in to change notification settings

iagreen/realtime-dart

 
 

Repository files navigation

realtime-dart

Listens to changes in a PostgreSQL Database and via websockets.

A dart client for Supabase Realtime server.

pub package pub test

Usage

Creating a Socket connection

You can set up one connection to be used across the whole app.

import 'package:realtime_client/realtime_client.dart';

var client = RealtimeClient(REALTIME_URL);
client.connect();

Socket Hooks

client.onOpen(() => print('Socket opened.'));
client.onClose((event) => print('Socket closed $event'));
client.onError((error) => print('Socket error: $error'));

Disconnect the socket

Call disconnect() on the socket:

client.disconnect()

Credits

License

This repo is licensed under MIT.

About

A dart client for Supabase Realtime server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%