electricsql 0.1.1
electricsql: ^0.1.1 copied to clipboard
A Dart implementation for ElectricSQL (electric-sql.com) client.
Electric Dart ⚡🎯 #
🛠️ WORK IN PROGRESS 🛠️
For development updates make sure to check out the official ElectricSQL Discord server, as well as the official Javascript client
Unofficial Dart client implementation for Electric.
Client based on the typescript client from the clients/typescript subfolder from electric git repository
Reference implementation: #
- NPM package.
- Version
v0.5.2 - Commit:
f1a3b873093a2ba2a29ff92883eb0811172890c9
Run the Todos example #
Flutter version used: 3.13.x
This demo is compatible with the todoMVC official example Link.
-
Run the Electric backend (Instructions)
- Locally, the
local-stackDocker Compose can be used Link
- Locally, the
-
Apply the migrations in Postgres following the Migrations section here
-
From inside the todos_flutter directory:
flutter runwith the platform of your choice. -
You can optionally tweak the
electrifyfunction inlib/electric.dartto change the Electric configuration, such as changing the URL or disable logs.
Note:
Right now the
todoMVCweb examples are running against Electric client version 0.4.3. Which is incompatible with the server in the commit this is based on. For now, if you want to test multiple clients simultaneously, you can run the Flutter app on multiple platforms or on web and test it with different browsers.
Development #
Dart 3.x and Melos required
dart pub global activate melos
Bootstrap the workspace #
melos bs
Generate the Protobuf code #
Install the protoc_plugin Dart package. Version used: ^20.0.1
dart pub global activate protoc_plugin 20.0.1
To generate the code
melos generate_proto
Run the tests #
melos test:all