CupertinoSwipeRefresh class

Refresh indicator widget with Cupertino style. stateStream - indicator state(SwipeRefreshState.loading or SwipeRefreshState.hidden). onRefresh - callback invoked when pulled by refreshTriggerPullDistance. children - list of any widgets. childrenDelegate - pass the inheritor to SliverChildDelegate to avoid creating more children than are visible through the Viewport. initState - initialization state(SwipeRefreshState.loading or SwipeRefreshState.hidden). padding - passed to add SliverPadding. scrollController - ScrollController for CustomScrollView. shrinkWrap - Whether the extent of the scroll view should be determined by the contents being viewed(default - false). refreshTriggerPullDistance - The amount of overscroll the scrollable must be dragged to trigger a reload(default - defaultRefreshTriggerPullDistance). refreshIndicatorExtent - amount of space the refresh indicator sliver will keep holding while onRefresh is still running. indicatorBuilder - builder that's called as this sliver's size changes, and as the state changes(default - CupertinoSliverRefreshControl.buildRefreshIndicator). keyboardDismissBehavior - ScrollViewKeyboardDismissBehavior the defines how this ScrollView will dismiss the keyboard automatically. (if == null it will be ScrollViewKeyboardDismissBehavior.onDrag). physics - defines the physics of the scroll(if == null it will be AlwaysScrollableScrollPhysics).

Inheritance

Constructors

CupertinoSwipeRefresh({required Stream<SwipeRefreshState> stateStream, required VoidCallback onRefresh, double refreshTriggerPullDistance = defaultRefreshTriggerPullDistance, double refreshIndicatorExtent = defaultRefreshIndicatorExtent, RefreshControlIndicatorBuilder indicatorBuilder = CupertinoSliverRefreshControl.buildRefreshIndicator, List<Widget>? children, SliverChildDelegate? childrenDelegate, SwipeRefreshState? initState, EdgeInsets? padding, ScrollController? scrollController, bool shrinkWrap = false, ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior, ScrollPhysics? physics, Key? key, double? cacheExtent})
const

Properties

cacheExtent double?
final
children List<Widget>?
finalinherited
childrenDelegate SliverChildDelegate?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
indicatorBuilder RefreshControlIndicatorBuilder
final
initState SwipeRefreshState?
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardDismissBehavior ScrollViewKeyboardDismissBehavior?
finalinherited
onRefresh VoidCallback
finalinherited
padding EdgeInsets?
finalinherited
physics ScrollPhysics?
finalinherited
refreshIndicatorExtent double
final
refreshTriggerPullDistance double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
finalinherited
shrinkWrap bool
finalinherited
stateStream Stream<SwipeRefreshState>
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → SwipeRefreshBaseState<SwipeRefreshBase>
Creates the mutable state for this widget at a given location in the tree.
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}) 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

Operators

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