Skip to content

Commit ec5bfad

Browse files
committed
Fix guard sync widget for django demo
1 parent c63e500 commit ec5bfad

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

demos/django-todolist/lib/widgets/guard_by_sync.dart

+4-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ class GuardBySync extends StatelessWidget {
2525
builder: (context, snapshot) {
2626
final status = snapshot.requireData;
2727
final (didSync, progress) = switch (priority) {
28-
null => (
29-
status.hasSynced ?? false,
30-
status.downloadProgress?.untilCompletion
31-
),
28+
null => (status.hasSynced ?? false, status.downloadProgress),
3229
var priority? => (
3330
status.statusForPriority(priority).hasSynced ?? false,
3431
status.downloadProgress?.untilPriority(priority)
@@ -42,9 +39,10 @@ class GuardBySync extends StatelessWidget {
4239
child: Column(
4340
children: [
4441
const Text('Busy with sync...'),
45-
LinearProgressIndicator(value: progress?.fraction),
42+
LinearProgressIndicator(value: progress?.downloadedFraction),
4643
if (progress case final progress?)
47-
Text('${progress.completed} out of ${progress.total}')
44+
Text(
45+
'${progress.downloadedOperations} out of ${progress.totalOperations}')
4846
],
4947
),
5048
);

demos/django-todolist/pubspec.lock

+5-5
Original file line numberDiff line numberDiff line change
@@ -310,21 +310,21 @@ packages:
310310
path: "../../packages/powersync"
311311
relative: true
312312
source: path
313-
version: "1.11.3"
313+
version: "1.12.4"
314314
powersync_core:
315315
dependency: "direct overridden"
316316
description:
317317
path: "../../packages/powersync_core"
318318
relative: true
319319
source: path
320-
version: "1.1.3"
320+
version: "1.2.4"
321321
powersync_flutter_libs:
322322
dependency: "direct overridden"
323323
description:
324324
path: "../../packages/powersync_flutter_libs"
325325
relative: true
326326
source: path
327-
version: "0.4.5"
327+
version: "0.4.7"
328328
pub_semver:
329329
dependency: transitive
330330
description:
@@ -438,10 +438,10 @@ packages:
438438
dependency: transitive
439439
description:
440440
name: sqlite3_web
441-
sha256: "870f287c2375117af1f769893c5ea0941882ee820444af5c3dcceec3b217aab1"
441+
sha256: "967e076442f7e1233bd7241ca61f3efe4c7fc168dac0f38411bdb3bdf471eb3c"
442442
url: "https://pub.dev"
443443
source: hosted
444-
version: "0.3.0"
444+
version: "0.3.1"
445445
sqlite_async:
446446
dependency: "direct main"
447447
description:

0 commit comments

Comments
 (0)