import 'dart:async'; import 'package:friendly_map/modules/core/core.dart'; import 'package:friendly_map/modules/storage/storage.dart'; import 'conflict.dart'; import 'sync_event.dart'; /// 동기화 부품들이 함께 쓰는 재료 묶음. class SyncContext { SyncContext({ required this.storage, required this.transport, required this.cipher, required this.identity, required this.clock, }) : conflict = ConflictRule(storage.meta); final Storage storage; final Transport transport; final PayloadCipher cipher; final IdentityProvider identity; final Clock clock; final ConflictRule conflict; final StreamController events = StreamController.broadcast(sync: true); Future me() => storage.settings.loadProfile(); }