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:

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

Constructors

RefreshConfiguration.new({Key? key, 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, 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, EmptyConfig? emptyConfig, int initPage = 1, EmptyBuilder? emptyBuilder})

Properties

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

Methods

copyOf({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, double? maxOverScrollExtent, double? maxUnderScrollExtent, double? topHitBoundary, double? bottomHitBoundary, double? headerTriggerDistance, double? footerTriggerDistance, bool? enableRefreshVibrate, bool? enableLoadMoreVibrate, bool? hideFooterWhenNotFull, EmptyConfig? emptyConfig, int? initPage, EmptyBuilder? emptyBuilder}) RefreshConfiguration
createElement() InheritedElement
Inflates this configuration to a concrete instance.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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, int wrapWidth = 65}) 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.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) RefreshConfiguration?