arcanelabsio — zsh — drive_sync_flutter

drive_sync_flutter.

Bidirectional Google Drive sync for Flutter.


A Dart package that syncs a local directory with a Google Drive folder in both directions. SHA-256 change detection, four conflict-resolution strategies, three OAuth scope modes, and pluggable adapters for non-Google backends. Used by every Arcane Labs app that treats Drive as a data layer.

Published on pub.dev. Requires Dart 3.11 or newer. MIT licensed.

Install

flutter pub add drive_sync_flutter

Latest release

What's new

  • Three OAuth scope modes. GoogleDriveAdapter now supports all three Google Drive scopes via explicit named constructors — the consumer chooses the compliance posture.
    • GoogleDriveAdapter.userDrive(basePath:, subPath:) — full drive scope. Required for multi-writer setups. Triggers annual CASA.
    • GoogleDriveAdapter.appFiles(folderName:, subPath:)drive.file scope. App sees only files it created. No CASA.
    • GoogleDriveAdapter.appData(subPath:)drive.appdata scope. Hidden per-OAuth-client folder. No CASA.
  • DriveScope enum exported so consumers can inspect adapter.scope.
  • DriveScopeError — 401/403 errors are translated into scope-mismatch errors with remediation messages.
  • SandboxValidator refactor — split structural path validation (always on) from the .app/{appName} naming convention.
  • 45 new tests covering all three modes and legacy constructor backward compatibility.

Backward compatibility

All existing constructors still work. .sandboxed() emits a deprecation warning pointing to the new API. Migration is a one-to-one call-site rewrite.

Links