You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres or MongoDB on the server-side (MySQL coming soon)._
_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres or MongoDB on the server-side (MySQL coming soon)._
8
8
9
9
This package (`powersync_core`) is the PowerSync client SDK for Dart.
10
10
11
+
> **Note**
12
+
>
13
+
> This is a Dart library for Powersync for use cases such as server-side Dart or non-Flutter Dart environments.
14
+
>
15
+
> If you are developing a Flutter application, use [powersync](https://pub.dev/packages/powersync) or [powersync_sqlcipher](https://pub.dev/packages/powersync_sqlcipher) instead. The `powersync_core` package is for non-Flutter Dart environments.
_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres or MongoDB on the server-side (MySQL coming soon)._
Our [full SDK reference](https://docs.powersync.com/client-sdk-references/flutter) contains everything you need to know to get started implementing PowerSync in your project.
20
20
21
-
### Demo app
21
+
This SDK requires a slightly different setup in order to encrypt the local database.
22
22
23
-
The easiest way to test out the alpha is to run the [Supabase Todo-List](./demos/supabase-todolist) demo app:
- Note: If you are an existing user updating to the latest code after a git pull, run `melos exec 'flutter pub upgrade'` in the repo's root and make sure it succeeds.
28
+
/// Global reference to the database
29
+
late final PowerSyncDatabase db;
28
30
29
-
2. Run `melos prepare` in the repo's root
30
-
3. cd into the `demos/supabase-todolist` folder
31
-
4. If you haven’t yet: `cp lib/app_config_template.dart lib/app_config.dart` (optionally update this config with your own Supabase and PowerSync project details).
32
-
5. Run `flutter run -d chrome`
31
+
final cipherFactory = PowerSyncSQLCipherOpenFactory(
32
+
path: path, key: "sqlcipher-encryption-key");
33
+
34
+
db = PowerSyncDatabase.withFactory(cipherFactory, schema: schema);
35
+
```
33
36
34
37
### Installing PowerSync in your own project
35
38
36
39
Install the latest version of the package, for example:
37
40
38
41
```
39
-
flutter pub add powersync_sqlcipher:'^0.1.0'
42
+
flutter pub add powersync_sqlcipher:^0.1.0
40
43
```
41
44
42
45
The latest version can be found [here](https://pub.dev/packages/powersync_sqlcipher/versions).
- Note: If you are an existing user updating to the latest code after a git pull, run `melos exec 'flutter pub upgrade'` in the repo's root and make sure it succeeds.
54
54
55
-
db = PowerSyncDatabase.withFactory(cipherFactory, schema: schema);
56
-
```
55
+
2. Run `melos prepare` in the repo's root
56
+
3. cd into the `demos/supabase-todolist` folder
57
+
4. If you haven’t yet: `cp lib/app_config_template.dart lib/app_config.dart` (optionally update this config with your own Supabase and PowerSync project details).
58
+
5. Run `flutter run -d chrome`
57
59
58
60
[comment]: #"The sections below need to be updated"
0 commit comments