cloud_sync_google_drive_adapter 0.0.1-rc.1
cloud_sync_google_drive_adapter: ^0.0.1-rc.1 copied to clipboard
A Flutter plugin for integrating Google Drive cloud sync functionality.
CloudSyncGoogleDriveAdapter #
A cloud-based implementation of the SyncAdapter interface from the cloud_sync package, using the Google Drive API for file synchronization. This adapter enables syncing metadata and binary content with the user's Google Drive storage.
β¨ Features #
- Syncs note metadata (
SyncMetadata) and binary detail content (List<int>) to and from Google Drive. - Supports reading metadata lists, downloading file content, and uploading or updating files.
- Ideal for use in apps that need cloud synchronization, backup, or multi-device data sharing.
π¦ Installation #
Add dependencies in your pubspec.yaml:
dependencies:
cloud_sync:
cloud_sync_google_drive_adapter:
π Usage #
import 'package:googleapis/drive/v3.dart' as drive;
import 'package:http/http.dart' as http;
import 'package:cloud_sync/cloud_sync.dart';
void main() async {
// Use `google_sign_in` to retrieve the `authClient`
final adapter = CloudSyncGoogleDriveAdapter(client: authClient);
}
π Class Overview #
class CloudSyncGoogleDriveAdapter implements SyncAdapter<SyncMetadata, List<int>>
spaces: Specify which Drive space to use (default:'appDataFolder').- Designed to work with binary content, suitable for encrypted notes, media, or complex objects.
π License #
MIT (or your projectβs license).