CustomRefreshIndicator class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CustomRefreshIndicator
Constructors
- CustomRefreshIndicator({Key? key, required Widget child, required AsyncCallback onRefresh, required IndicatorBuilder builder, IndicatorController? controller, IndicatorTrigger trigger = IndicatorTrigger.leadingEdge, IndicatorTriggerMode triggerMode = IndicatorTriggerMode.onEdge, ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate, bool autoRebuild = true, double? offsetToArmed, OnStateChanged? onStateChanged, double? containerExtentPercentageToArmed, @Deprecated('In favor of durations parameter') Duration? indicatorCancelDuration, @Deprecated('In favor of durations parameter') Duration? indicatorSettleDuration, @Deprecated('In favor of durations parameter') Duration? indicatorFinalizeDuration, @Deprecated('In favor of durations parameter') Duration? completeStateDuration, bool leadingScrollIndicatorVisible = false, bool trailingScrollIndicatorVisible = true, RefreshIndicatorDurations durations = const RefreshIndicatorDurations()})
Properties
- autoRebuild → bool
-
When set to true, the builder function will be called whenever the controller changes.
It is set to
true
by default.final - builder → IndicatorBuilder
-
Function that builds the custom refresh indicator.
final
- child → Widget
-
Part of widget tree that contains scrollable widget (like ListView).
final
- containerExtentPercentageToArmed → double
-
The distance the user must scroll for the indicator to be armed,
as a percentage of the scrollable's container extent.
final
- controller → IndicatorController?
-
The indicator controller stores all the data related
to the refresh indicator widget.
It extends the Animation class.
final
- durations → RefreshIndicatorDurations
-
Defines a durations that are used to control the duration of each phase,
allowing you to adjust the behavior of the refresh indicator.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leadingScrollIndicatorVisible → bool
-
Whether to display leading scroll indicator
final
- notificationPredicate → ScrollNotificationPredicate
-
Determines whether the received ScrollNotification should
be handled by this widget.
final
- offsetToArmed → double?
-
The distance in number of pixels that the user should drag to arm the indicator.
The armed indicator will trigger the onRefresh function when the gesture is completed.
final
- onRefresh → AsyncCallback
-
A function that is called when the user drags the refresh indicator
far enough to trigger a "pull to refresh" action.
final
- onStateChanged → OnStateChanged?
-
Called on every indicator state change.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trailingScrollIndicatorVisible → bool
-
Whether to display trailing scroll indicator
final
- trigger → IndicatorTrigger
-
Defines the trigger for the pull to refresh gesture.
final
- triggerMode → IndicatorTriggerMode
-
Configures how CustomRefreshIndicator can be triggered.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → CustomRefreshIndicatorState -
Creates the mutable state for this widget at a given location in the tree.
override
-
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
Static Methods
-
defaultScrollNotificationPredicate(
ScrollNotification notification) → bool -
A ScrollNotificationPredicate that checks whether
notification.depth == 0
, which means that the notification did not bubble through any intervening scrolling widgets.
Constants
- armedFromValue → const double
- The value from which IndicatorController is considered to be armed.
- defaultContainerExtentPercentageToArmed → const double
- The default distance the user must over-scroll for the indicator to be armed, as a percentage of the scrollable's container extent.