Skip to main content
v0.2.0-beta.5Production Ready

Enterprise-Grade
Local-First Sync Engine

Production-ready synchronization infrastructure for Flutter. Built with Isar, powered by event-driven architecture, designed for mission-critical applications.

48 Tests Passing
160/160 Pub Score
312 KB Package
5 Platforms

Local Storage

  • Isar Database
  • Offline Queue
  • Version Tracking

Sync Engine

  • Event-Driven
  • Conflict Resolution
  • Auto-Retry Logic

Backend Adapters

  • REST API
  • Firebase
  • Supabase

Developer Experience First

Clean API. Zero boilerplate. Production ready.

Installation

yaml
dependencies:
  synclayer: ^0.2.0-beta.5

# Run
flutter pub get

Initialization

dart
await SyncLayer.init(
  SyncConfig(
    baseUrl: 'https://api.example.com',
    collections: ['todos', 'users'],
    conflictStrategy: ConflictStrategy.lastWriteWins,
  ),
);

CRUD Operations

dart
// Create
final id = await SyncLayer
  .collection('todos')
  .save({'text': 'Buy milk', 'done': false});

// Read
final todo = await SyncLayer
  .collection('todos')
  .get(id);

// Update
await SyncLayer
  .collection('todos')
  .save({'done': true}, id: id);

// Delete
await SyncLayer
  .collection('todos')
  .delete(id);

Real-time Updates

dart
// Watch for changes
SyncLayer
  .collection('todos')
  .watch()
  .listen((todos) {
    print('Updated: ${todos.length} items');
  });

// Manual sync
await SyncLayer.syncNow();

Built for Scale

Enterprise-grade features out of the box

Isar-Powered Storage

Lightning-fast local database with zero-copy object access and ACID compliance

< 1ms queriesNoSQL flexibilityType-safe

Event-Driven Architecture

Reactive sync engine with comprehensive event system for monitoring and debugging

Real-time eventsFull observabilityError tracking

Conflict Resolution

Configurable strategies: last-write-wins, server-wins, client-wins with version tracking

3 strategiesVersion controlHash-based

Intelligent Retry

Exponential backoff with configurable max retries and automatic queue management

Auto-retryQueue systemFailure handling

Connectivity Aware

Automatic network detection with seamless offline-to-online transitions

Auto-detectSeamless syncQueue replay

Backend Agnostic

Adapter pattern for any backend: REST, Firebase, Supabase, Appwrite, or custom

4 adaptersCustom supportType-safe

Performance Benchmarks

< 5s
Save 100 Records
Individual operations
< 1s
Retrieve 100 Records
Batch queries
< 3s
Delete 100 Records
Bulk operations
< 10s
Sync 100 Operations
Full sync cycle

Technical Comparison

FeatureSyncLayerFirebaseSupabaseDrift
Offline-First
Auto-Sync
Backend Agnostic
Conflict Resolution
Event System
Type-Safe
Package Size312 KB~2 MB~1.5 MB~500 KB
Free TierLimitedLimited

Ready for Production

Join developers building the next generation of offline-first applications