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
Copy file name to clipboardExpand all lines: packages/powersync/README.md
+8-39Lines changed: 8 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,13 @@ flutter pub add powersync
18
18
19
19
# Getting Started
20
20
21
-
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.
21
+
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.
22
22
23
23
## **Web support - Beta**
24
24
25
-
Web support in version 1.9.0 is currently in a beta release. This means it is safe to use in production, provided that you've tested your use cases.
25
+
Web support in version 1.9.0 is currently in a beta release. It is functionally ready for production use, provided that you've tested your use cases.
26
+
27
+
Please familiarize yourself with the Current Limitations for Web documented [here](https://docs.powersync.com/client-sdk-references/flutter/flutter-web-support#current-limitations).
26
28
27
29
### Demo app
28
30
@@ -39,53 +41,20 @@ The easiest way to test Flutter Web support is to run the [Supabase Todo-List](h
39
41
40
42
### Installing PowerSync in your own project
41
43
42
-
Install the latest version of the package, for example:
44
+
Install the [latest version]((https://pub.dev/packages/powersync/versions)) of the package, for example:
43
45
44
46
```
45
47
flutter pub add powersync:'^1.9.0'
46
48
```
47
49
48
-
The latest version can be found [here](https://pub.dev/packages/powersync/versions).
49
-
50
-
### Additional config
50
+
#### Additional config
51
51
52
-
Web support requires `sqlite3.wasm` and worker (`powersync_db.worker.js` and `powersync_sync.worker.js`) assets to be served from the web application. They can be downloaded to the `web` directory by running the following command in your application's root folder.
52
+
Web support requires `sqlite3.wasm` and worker (`powersync_db.worker.js` and `powersync_sync.worker.js`) assets to be served from the web application. They can be downloaded to the web directory by running the following command in your application's root folder.
53
53
54
-
```dart
54
+
```bash
55
55
dart run powersync:setup_web
56
56
```
57
57
58
-
The same code is used for initializing native and web `PowerSyncDatabase` clients.
59
-
60
-
### Limitations
61
-
62
-
The API for Web is essentially the same as for native platforms, however, some features within `PowerSyncDatabase` clients are not available.
63
-
64
-
#### Imports
65
-
66
-
Flutter Web does not support importing directly from `sqlite3.dart` as it uses `dart:ffi`.
67
-
68
-
Change imports from
69
-
70
-
```Dart
71
-
import 'package/powersync/sqlite3.dart`
72
-
```
73
-
74
-
to
75
-
76
-
```Dart
77
-
import 'package/powersync/sqlite3_common.dart'
78
-
```
79
-
80
-
In code which needs to run on the Web platform. Isolated native specific code can still import from `sqlite3.dart`.
81
-
82
-
#### Database connections
83
-
84
-
Web DB connections do not support concurrency. A single DB connection is used. `readLock` and `writeLock` contexts do not
85
-
implement checks for preventing writable queries in read connections and vice-versa.
86
-
87
-
Direct access to the synchronous `CommonDatabase` (`sqlite.Database` equivalent for web) connection is not available. `computeWithDatabase` is not available on web.
88
-
89
58
# Changelog
90
59
91
60
A changelog for this SDK is available [here](https://releases.powersync.com/announcements/flutter-client-sdk).
0 commit comments