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_flutterLatest release
What's new
- Three OAuth scope modes.
GoogleDriveAdapternow supports all three Google Drive scopes via explicit named constructors — the consumer chooses the compliance posture.GoogleDriveAdapter.userDrive(basePath:, subPath:)— fulldrivescope. Required for multi-writer setups. Triggers annual CASA.GoogleDriveAdapter.appFiles(folderName:, subPath:)—drive.filescope. App sees only files it created. No CASA.GoogleDriveAdapter.appData(subPath:)—drive.appdatascope. Hidden per-OAuth-client folder. No CASA.
DriveScopeenum exported so consumers can inspectadapter.scope.DriveScopeError— 401/403 errors are translated into scope-mismatch errors with remediation messages.SandboxValidatorrefactor — 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
- pub.dev — package on pub.dev
- GitHub — source code and README
- Getting started — tutorial for new users