electricsql 0.1.0 copy "electricsql: ^0.1.0" to clipboard
electricsql: ^0.1.0 copied to clipboard

A Dart implementation for ElectricSQL (electric-sql.com).

Tests

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


Non official Dart client implementation for Electric based on commit cd77e4a67f5367e1376cab752bd16177801d20b5 of the electric git repository

  • Client based on the typescript client from the clients/typescript subfolder.

  • Electric backend running with the local-stack Docker Compose using the electric Docker image built in that specific commit.

Run the Todos example #

Flutter version used: 3.10.x

This demo is compatible with the todoMVC official example Link.

  1. Run the Electric backend (Instructions)

  2. Apply the migrations in Postgres following the Migrations section here

  3. From inside the todos_flutter directory: flutter run with the platform of your choice.

Note:

Right now the todoMVC web examples are running against Electric client version 0.4.3. Which is incompatible with the server in the commit this is based on. You'll need to compile the typescript client and use that build in the web examples.

Electric Flutter

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