cloud_sync_hive_adapter 0.0.1-rc.1 copy "cloud_sync_hive_adapter: ^0.0.1-rc.1" to clipboard
cloud_sync_hive_adapter: ^0.0.1-rc.1 copied to clipboard

A Flutter plugin for integrating Hive sync functionality.

CloudSyncHiveAdapter #

A local implementation of the SyncAdapter interface from the cloud_sync package, using Hive for local storage. This adapter enables synchronization of notes and their associated metadata between your app and a local Hive database.

✨ Features #

  • Stores note metadata (SyncMetadata) and detail content (String) using Hive.
  • Supports fetching and saving notes with metadata.
  • Designed for local use within a sync system (e.g., to back Google Drive or other sync sources).

πŸ“¦ Installation #

Add dependencies in your pubspec.yaml:

dependencies:
  hive_ce:
  cloud_sync:
  cloud_sync_hive_adapter:

πŸš€ Usage #

import 'package:hive_ce/hive.dart';
import 'package:cloud_sync/cloud_sync.dart';

void main() async {
  final metadataBox = await Hive.openBox<SyncMetadata>('metadataBox');
  final detailBox = await Hive.openBox<String>('detailBox');

  final adapter = CloudSyncHiveAdapter(metadataBox, detailBox);
  
  // Now you can use the adapter with a CloudSync
}

πŸ“ Class Overview #

class CloudSyncHiveAdapter implements SyncAdapter<SyncMetadata, String>
  • metadataBox: Hive box that stores SyncMetadata.
  • detailBox: Hive box that stores note details as String.

πŸ“„ License #

MIT (or your project's license).

2
likes
0
points
122
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for integrating Hive sync functionality.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cloud_sync, hive_ce

More

Packages that depend on cloud_sync_hive_adapter