attach method

  1. @override
void attach(
  1. ScrollPosition position
)
override

Register the given position with this controller.

After this function returns, the animateTo and jumpTo methods on this controller will manipulate the given position.

Implementation

@override
void attach(ScrollPosition position) {
//    print('{$code}:attach start {$showing}');
//    if (position == interceptedAttachPosition) print("attach by inner");
  position.hasListeners;
//    print('{$code}:attach end {$showing}');
  if (inner.positions.contains(position)) return;
  if (showing) {
    inner.attach(position);
    lastPosition = position;
  } else {
    interceptedAttachPosition = position;
  }
}