scrollTo method

void scrollTo(
  1. double offset
)

立即滚动到指定内容偏移,并夹在有效范围内。

Implementation

void scrollTo(double offset) {
  final position = _position;
  if (position == null) return;
  position.jumpTo(offset.clamp(0.0, position.maxScrollExtent));
}