Skip to content
This repository was archived by the owner on May 13, 2023. It is now read-only.

supabase/realtime-dart

Folders and files

NameName
Last commit message
Last commit date
Oct 17, 2022
Aug 29, 2022
Mar 9, 2023
Sep 24, 2022
Jan 31, 2021
Mar 9, 2023
Oct 15, 2020
May 13, 2023
Jul 19, 2022
Mar 9, 2023

Repository files navigation

realtime-dart

Warning This repository has been moved to the supabase-flutter repo.

Listens to changes in a PostgreSQL Database and via websockets.

A dart client for Supabase Realtime server.

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.