RefreshPhysics class

a scrollPhysics for config refresh scroll effect,enable viewport out of edge whatever physics it is in ClampingScrollPhysics, it doesn't allow to flip out of edge,but in RefreshPhysics,it will allow to do that, by parent physics passing,it also can attach the different of iOS and Android different scroll effect it also handles interception scrolling when refreshed, or when the second floor is open and closed. with SpringDescription passing,you can custom spring back animate,the more paramter can be setting in RefreshConfiguration

see also:

  • RefreshConfiguration, a configuration for Controlling how SmartRefresher widgets behave in a subtree


RefreshPhysics({ScrollPhysics parent, int updateFlag, double maxUnderScrollExtent, SpringDescription springDescription, RefreshController controller, double dragSpeedRatio, double topHitBoundary, double bottomHitBoundary, bool enableScrollWhenRefreshCompleted, bool enableScrollWhenTwoLevel, double maxOverScrollExtent})
Creates scroll physics that bounce back from the edge.


allowImplicitScrolling bool
Whether a viewport is allowed to change its scroll position implicitly in response to a call to RenderObject.showOnScreen. [...]
read-only, inherited
bottomHitBoundary double
controller RefreshController
dragSpeedRatio double
dragStartDistanceMotionThreshold double
The minimum amount of pixel distance drags must move by to start motion the first time or after each time the drag motion stopped. [...]
read-only, inherited
enableScrollWhenRefreshCompleted bool
enableScrollWhenTwoLevel bool
hashCode int
The hash code for this object. [...]
read-only, inherited
maxFlingVelocity double
Scroll fling velocity magnitudes will be clamped to this value.
read-only, inherited
maxOverScrollExtent double
maxUnderScrollExtent double
minFlingDistance double
The minimum distance an input pointer drag must have moved to to be considered a scroll fling gesture. [...]
read-only, inherited
minFlingVelocity double
The minimum velocity for an input pointer drag to be considered a scroll fling. [...]
read-only, inherited
parent ScrollPhysics
If non-null, determines the default behavior for each method. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, override
spring SpringDescription
The spring to use for ballistic simulations.
read-only, inherited
springDescription SpringDescription
tolerance Tolerance
The tolerance to use for ballistic simulations.
read-only, inherited
topHitBoundary double
updateFlag int
viewportRender RenderViewport
find out the viewport when bouncing,for compute the layoutExtent in header and footer This does not have any impact on performance. it only execute once
read / write


adjustPositionForNewDimensions({required ScrollMetrics oldPosition, required ScrollMetrics newPosition, required bool isScrolling, required double velocity}) double
Describes what the scroll position should be given new viewport dimensions. [...]
applyBoundaryConditions(ScrollMetrics position, double value) double
Determines the overscroll by applying the boundary conditions. [...]
applyPhysicsToUserOffset(ScrollMetrics position, double offset) double
Used by DragScrollActivity and other user-driven activities to convert an offset in logical pixels as provided by the DragUpdateDetails into a delta to apply (subtract from the current position) using ScrollActivityDelegate.setPixels. [...]
applyTo(ScrollPhysics ancestor) RefreshPhysics
Combines this ScrollPhysics instance with the given physics. [...]
buildParent(ScrollPhysics ancestor) ScrollPhysics
If parent is null then return ancestor, otherwise recursively build a ScrollPhysics that has ancestor as its parent. [...]
@protected, inherited
carriedMomentum(double existingVelocity) double
Returns the velocity carried on repeated flings. [...]
createBallisticSimulation(ScrollMetrics position, double velocity) Simulation
Returns a simulation for ballistic scrolling starting from the given position with the given velocity. [...]
findViewport(BuildContext context) RenderViewport
frictionFactor(double overscrollFraction) double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
recommendDeferredLoading(double velocity, ScrollMetrics metrics, BuildContext context) bool
Provides a heuristic to determine if expensive frame-bound tasks should be deferred. [...]
shouldAcceptUserOffset(ScrollMetrics position) bool
Whether the scrollable should let the user adjust the scroll offset, for example by dragging. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]