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

discontinued
outdated

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

Tests

pub package pub package pub package

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.

  1. Run the Electric backend (Instructions)

    • Locally, the local-stack Docker Compose can be used Link
  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.

  4. You can optionally tweak the electrify function in lib/electric.dart to change the Electric configuration, such as changing the URL or disable logs.

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. 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.

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

37
likes
0
points
78
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ansicolor, collection, crypto, dart_jsonwebtoken, drift, equatable, events_emitter, fixnum, http, logging, meta, protobuf, rate_limiter, retry, sqlite3, synchronized, uuid, web_socket_channel

More

Packages that depend on electricsql