locorda_flutter 0.5.2 copy "locorda_flutter: ^0.5.2" to clipboard
locorda_flutter: ^0.5.2 copied to clipboard

Flutter integration for Locorda BYOB sync — combines ObjectSyncEngine, worker architecture, and UI widgets into a single Locorda facade for offline-first Flutter apps.

locorda_flutter #

pub package license

Flutter integration layer for locorda — combines ObjectSyncEngine with worker architecture and UI components to give Flutter apps a single Locorda entry point.

For most Flutter applications, use the locorda facade package instead. It re-exports everything from locorda_flutter plus backend-specific packages (Drift, Worker, UI widgets), so you rarely need to depend on locorda_flutter directly.

Features #

  • Locorda facade: one-call setup for the complete sync system
  • Worker architecture: heavy operations (CRDT merge, I/O) run in a Dart Isolate / Web Worker
  • Multi-backend UI: MultiBackendStatusWidget and SyncRefreshIndicator work with any backend
  • Platform: Flutter (iOS · Android · Web · Desktop)

Installation #

flutter pub add locorda_flutter

Key types #

Type Description
Locorda Top-level facade — wraps ObjectSyncEngine + UI registry
Locorda.create() Factory: spawns worker, wires backend handlers, returns ready instance
syncManager Manual sync trigger, status stream, auto-sync control
uiAdapterRegistry Query active backends for MultiBackendStatusWidget

Usage #

import 'package:locorda_flutter/locorda_flutter.dart';

// Main thread (main.dart)
final locorda = await Locorda.create(
  workerSetup: setupWorkerEngine, // defined in worker.dart
  config: LocordaConfig(
    resources: [/* ResourceConfig per type */],
  ),
  remotes: [gdriveHandler], // one or more backend integrations
);

// Access the typed sync engine
await locorda.syncEngine.save(myNote);

// Monitor sync status
locorda.syncManager.statusStream.listen(print);

See the Personal Notes App for a complete production example including Solid and Google Drive backends.

Further reading #

0
likes
150
points
77
downloads

Documentation

API reference

Publisher

verified publisherlocorda.dev

Weekly Downloads

Flutter integration for Locorda BYOB sync — combines ObjectSyncEngine, worker architecture, and UI widgets into a single Locorda facade for offline-first Flutter apps.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#crdt #offline-first #sync #flutter

License

MIT (license)

Dependencies

flutter, locorda_core, locorda_flutter_core, locorda_objects, locorda_rdf_core, locorda_rdf_mapper, locorda_ui, locorda_worker

More

Packages that depend on locorda_flutter