completionEvents property

Stream<void> get completionEvents

A broadcast stream of sync completion events.

Emitted when synchronization of incoming changes has completed and the client is up-to-date with the server.

Subscribe (listen) to the stream to start receiving events. Cancel the subscription when no longer needed to free resources.

Implementation

Stream<void> get completionEvents {
  if (_completionEvents == null) {
    _completionEvents = _SyncListenerGroup<void>('sync-completion');

    _completionEvents!.add(_SyncListenerConfig(
        (int nativePort) => C.dartc_sync_listener_complete(_ptr, nativePort),
        (dynamic _, controller) => controller.add(null)));

    _completionEvents!.finish();
  }
  return _completionEvents!.stream;
}