sync method
Implementation
Future<void> sync() async {
if (channel == null || provider == null) return;
syncStatus.value = SyncStatus.syncing;
try {
await provider!.publish(channel!, value);
syncStatus.value = SyncStatus.synced;
} catch (e) {
syncStatus.value = SyncStatus.error;
if (kDebugMode) {
debugPrint('Sync error: $e');
}
}
}