subscribeToShapeSubscriptionSyncStatusChanges method

  1. @override
UnsubscribeFunction subscribeToShapeSubscriptionSyncStatusChanges(
  1. ShapeSubscriptionSyncStatusChangeCallback callback
)
override

Implementation

@override
UnsubscribeFunction subscribeToShapeSubscriptionSyncStatusChanges(
  ShapeSubscriptionSyncStatusChangeCallback callback,
) {
  void wrappedCallback(
    ShapeSubscriptionSyncStatusChangeNotification notification,
  ) {
    if (_hasDbName(notification.dbName)) {
      callback(notification);
    }
    return;
  }

  final eventListener = EventListener(
    EventNames.shapeSubscriptionStatusChange,
    wrappedCallback,
  );
  _subscribe(eventListener);

  return () => _unsubscribe(eventListener);
}