ScrollNotificationExtension extension
对 ScrollNotification 的扩展,提供便捷的滚动度量属性访问。 Extension on ScrollNotification for convenient access to scroll metrics.
使用场景:在 NotificationListener<ScrollNotification> 中监听滚动事件时, 可以直接通过这些属性获取滚动位置、边界状态等信息。 Use case: when listening to scroll events in NotificationListener<ScrollNotification>, these properties provide quick access to scroll position, boundary state, etc.
Properties
- atEdge → bool
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
是否已滚动到边界(顶部/底部/左/右)。 Whether the scroll position is at an edge (top/bottom/left/right).no setter - axis → Axis
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
滚动的轴向(水平或垂直)。 The scroll axis (horizontal or vertical).no setter - canScroll → bool
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
内容是否可以滚动(内容是否超出视口)。 Whether the content can scroll (content exceeds the viewport).no setter - desc → String
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
返回所有滚动度量属性的格式化描述(用于调试)。 Returns a formatted description of all scroll metrics (for debugging).no setter - extentAfter → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
当前视口之后的滚动范围(尚未滚动到的区域)。 The scroll extent after the current viewport (not yet scrolled to).no setter - extentBefore → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
当前视口之前的滚动范围(已滚动过的区域)。 The scroll extent before the current viewport (already scrolled past).no setter - extentInside → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
当前视口内的滚动范围(可见内容区域)。 The scroll extent currently visible within the viewport.no setter - fullScrollExtent → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
总滚动范围 = extentBefore + extentInside + extentAfter。 Total scroll extent = extentBefore + extentInside + extentAfter.no setter - maxScrollExtent → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
可滚动范围的最大滚动偏移量。 The maximum scroll offset of the scrollable range.no setter - minScrollExtent → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
可滚动范围的最小滚动偏移量。 The minimum scroll offset of the scrollable range.no setter - outOfRange → bool
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
当前滚动位置是否超出正常范围(如 iOS 的弹性滚动效果)。 Whether the scroll position is out of range (e.g., iOS overscroll effect).no setter - pixels → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
当前的滚动位置(像素)。 The current scroll position in pixels.no setter - viewportDimension → double
-
Available on ScrollNotification, provided by the ScrollNotificationExtension extension
视口(可见区域)在滚动方向上的尺寸。 The size of the viewport along the scroll axis.no setter