fix: Close generated sync sessions and expose the shared demo (#135)
This commit is contained in:
parent
4789f650be
commit
0f4b8116f4
1 changed files with 266 additions and 35 deletions
|
|
@ -175,6 +175,14 @@ await client.offlineSync.syncOnce(session);
|
|||
final syncSession = client.offlineSync.syncContinuously(session);
|
||||
```
|
||||
|
||||
When disposing a client replica, cancel its sync subscription before closing
|
||||
the local database:
|
||||
|
||||
```dart
|
||||
await syncSession.cancel();
|
||||
await session.close();
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Once wired up, use normal generated-model CRUD against the `session` instance,
|
||||
|
|
|
|||
Loading…
Reference in a new issue