RefreshConfiguration class

Controls how SmartRefresher widgets behave in a subtree.the usage just like ScrollConfiguration

The refresh configuration determines smartRefresher some behaviours,global setting default indicator

see also:

  • SmartRefresher, a widget help attach the refresh and load more function
Inheritance

Constructors

RefreshConfiguration({@required Widget child, IndicatorBuilder headerBuilder, IndicatorBuilder footerBuilder, double dragSpeedRatio = 1.0, ShouldFollowContent shouldFooterFollowWhenNotFull, bool enableScrollWhenTwoLevel = true, bool enableLoadingWhenNoData = false, bool enableBallisticRefresh = false, SpringDescription springDescription = const SpringDescription(mass: 2.2, stiffness: 150, damping: 16), bool enableScrollWhenRefreshCompleted = false, bool enableLoadingWhenFailed = true, double twiceTriggerDistance = 150.0, double closeTwoLevelDistance = 80.0, bool skipCanRefresh = false, bool autoLoad = true, double maxOverScrollExtent, bool enableBallisticLoad = true, double maxUnderScrollExtent, double headerTriggerDistance = 80.0, double footerTriggerDistance = 15.0, bool hideFooterWhenNotFull = false, bool enableRefreshVibrate = false, bool enableLoadMoreVibrate = false, double topHitBoundary, double bottomHitBoundary})
RefreshConfiguration.copyAncestor({@required BuildContext context, @required Widget child, IndicatorBuilder headerBuilder, IndicatorBuilder footerBuilder, double dragSpeedRatio, ShouldFollowContent shouldFooterFollowWhenNotFull, bool enableScrollWhenTwoLevel, bool enableBallisticRefresh, bool enableBallisticLoad, bool enableLoadingWhenNoData, SpringDescription springDescription, bool enableScrollWhenRefreshCompleted, bool enableLoadingWhenFailed, double twiceTriggerDistance, double closeTwoLevelDistance, bool skipCanRefresh, bool autoLoad, double maxOverScrollExtent, double maxUnderScrollExtent, double topHitBoundary, double bottomHitBoundary, double headerTriggerDistance, double footerTriggerDistance, bool enableRefreshVibrate, bool enableLoadMoreVibrate, bool hideFooterWhenNotFull})
Construct RefreshConfiguration to copy attributes from ancestor nodes If the parameter is null, it will automatically help you to absorb the attributes of your ancestor Refresh Configuration, instead of having to copy them manually by yourself. [...]

Properties

autoLoad bool
whether footer can trigger load by reaching footerDistance when idle
final
bottomHitBoundary double
The boundary is located at the bottom edge and stops when inertia rolls under the boundary distance
final
child Widget
The widget below this widget in the tree. [...]
final
closeTwoLevelDistance double
Close the bottom crossing distance on the second floor, premise:enableScrollWhenTwoLevel is true
final
dragSpeedRatio double
the speed ratio when dragging overscroll ,compute=origin physics dragging speed *dragSpeedRatio
final
enableBallisticLoad bool
whether trigger loading by BallisticScrollActivity
final
enableBallisticRefresh bool
whether trigger refresh by BallisticScrollActivity
final
enableLoadingWhenFailed bool
whether footer can trigger load by reaching footerDistance when failed state
final
enableLoadingWhenNoData bool
whether footer can trigger load by reaching footerDistance when inNoMore state
final
enableLoadMoreVibrate bool
toggle of loadmore vibrate
final
enableRefreshVibrate bool
toggle of refresh vibrate
final
enableScrollWhenRefreshCompleted bool
whether user can drag viewport when refresh complete and spring back
final
enableScrollWhenTwoLevel bool
whether user can drag viewport when twoLeveling
final
footerBuilder IndicatorBuilder
global default footer builder
final
footerTriggerDistance double
the extentAfter distance of trigger loading
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
headerBuilder IndicatorBuilder
global default header builder
final
headerTriggerDistance double
overScroll distance of trigger refresh
final
hideFooterWhenNotFull bool
when listView data small(not enough one page) , it should be hide
final
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
maxOverScrollExtent double
max overScroll distance when out of edge
final
maxUnderScrollExtent double
max underScroll distance when out of edge
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
shouldFooterFollowWhenNotFull ShouldFollowContent
if it should follow content for different state
final
skipCanRefresh bool
If need to refreshing now when reaching triggerDistance
final
springDescription SpringDescription
custom spring animate
final
topHitBoundary double
The boundary is located at the top edge and stops when inertia rolls over the boundary distance
final
twiceTriggerDistance double
the overScroll distance of trigger twoLevel
final

Methods

createElement() InheritedElement
Inflates this configuration to a concrete instance. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object. [...]
inherited
toStringDeep({String prefixLineOne = '', String prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited
updateShouldNotify(covariant RefreshConfiguration oldWidget) bool
Whether the framework should notify widgets that inherit from this widget. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited

Static Methods

of(BuildContext context) RefreshConfiguration