scrollAnchorIn method

Future<ScrollAnchor?> scrollAnchorIn(
  1. Scene scene,
  2. SemanticScene semantic
)

probeScrollAnchor against a scene + semantic view the caller holds; the anchor is scrolled content, never the viewport itself, whose center stays put.

Implementation

Future<ScrollAnchor?> scrollAnchorIn(Scene scene, SemanticScene semantic) async {
  final list = semantic.root.walk().whereType<SemanticList>().firstOrNull;
  return list == null ? null : _anchorWithin(scene, list);
}