pickAutoScrollableStableId static method
Pure picker for the SDK auto-detect scroll fallback.
Implementation
static String? pickAutoScrollableStableId(
MissionStep step,
UiSnapshot snap,
) {
final targetStableId = step.targetStableId;
if (targetStableId != null && targetStableId.isNotEmpty) {
final target = snap.findByStableId(targetStableId);
if (target != null) {
final ancestor = _nearestScrollableAncestor(target, snap);
if (ancestor != null) return ancestor.stableId;
}
}
// Android ScrollerPolicy: topmost layer only (never the page behind a
// sheet), vertical largest first, horizontal only for strips — a pager
// is navigation, never a discovery scroll.
return planScrollables(snap).dominant?.stableId;
}