attach method

void attach(
  1. Controller inner
)

Binds this controller to a planner's internal zoom/scroll Controller. Called by Planner from its initState/didUpdateWidgetnot part of the consumer API. Re-binding to the same inner is a no-op; binding to a different one detaches the previous first, so the listener is never doubled.

Implementation

void attach(Controller inner) {
  if (identical(_inner, inner)) return;
  _inner?.triggerUpdate.removeListener(notifyListeners);
  _inner = inner;
  inner.triggerUpdate.addListener(notifyListeners);
}