unregisterStrip method

void unregisterStrip(
  1. ScrollController controller
)

Called by SSpreadsheet when a strip is about to dispose its controller, so ownership moves on while the remaining strips are still usable.

Implementation

void unregisterStrip(ScrollController controller) {
  if (_disposed) return;
  _strips.remove(controller);
  if (identical(_owner, controller)) _owner = null;
  _electOwner();
  // Deferred for the same reason as [registerStrip]: dispose runs during a
  // build/teardown pass, and the published controller is already cleared
  // above so nothing reads the dying strip in the meantime.
  _schedulePublish();
}