applyTo method

  1. @override
RefreshPhysics applyTo(
  1. ScrollPhysics? ancestor
)
override

创建一个新的滚动物理效果,将当前物理效果应用到父级物理效果上

参数:

  • ancestor:父级滚动物理效果
  • 返回值:一个新的RefreshPhysics实例

Implementation

@override

/// 创建一个新的滚动物理效果,将当前物理效果应用到父级物理效果上
///
/// 参数:
/// - [ancestor]:父级滚动物理效果
/// - 返回值:一个新的RefreshPhysics实例
RefreshPhysics applyTo(ScrollPhysics? ancestor) {
  return RefreshPhysics(
      parent: buildParent(ancestor),
      updateFlag: updateFlag,
      springDescription: springDescription,
      dragSpeedRatio: dragSpeedRatio,
      topHitBoundary: topHitBoundary,
      bottomHitBoundary: bottomHitBoundary,
      controller: controller,
      enableScrollWhenRefreshCompleted: enableScrollWhenRefreshCompleted,
      maxUnderScrollExtent: maxUnderScrollExtent,
      maxOverScrollExtent: maxOverScrollExtent);
}