CustomMaterialIndicator class

Inheritance

Constructors

CustomMaterialIndicator({Key? key, required Widget child, required AsyncCallback onRefresh, required MaterialIndicatorBuilder indicatorBuilder, IndicatorBuilder scrollableBuilder = _defaultBuilder, ScrollNotificationPredicate notificationPredicate = CustomRefreshIndicator.defaultScrollNotificationPredicate, Color? backgroundColor, double displacement = 40.0, double edgeOffset = 0.0, bool withRotation = true, double elevation = 2.0, Clip clipBehavior = Clip.none, bool autoRebuild = true, IndicatorTrigger trigger = IndicatorTrigger.leadingEdge, IndicatorTriggerMode triggerMode = IndicatorTriggerMode.onEdge, IndicatorController? controller, RefreshIndicatorDurations durations = const RefreshIndicatorDurations(), OnStateChanged? onStateChanged, bool leadingScrollIndicatorVisible = false, bool trailingScrollIndicatorVisible = true})
const

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
backgroundColor Color?
The indicator background color
final
child Widget
Part of widget tree that contains scrollable widget (like ListView).
final
clipBehavior Clip
The content will be clipped (or not) according to this option.
final
controller IndicatorController?
The indicator controller stores all the data related to the refresh indicator widget. It extends the Animation class.
final
displacement double
The distance from the child's top or bottom edgeOffset where the refresh indicator will settle. During the drag that exposes the refresh indicator, its actual displacement may significantly exceed this value.
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
edgeOffset double
The offset where indicator starts to appear on drag start.
final
elevation double
The z-coordinate at which to place this material relative to its parent.
final
hashCode int
The hash code for this object.
no setterinherited
indicatorBuilder MaterialIndicatorBuilder
Builds the content for the indicator container
final
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
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
scrollableBuilder IndicatorBuilder
A builder that constructs a scrollable widget, typically used for a list.
final
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
withRotation bool
When set to true, the indicator will rotate in the IndicatorState.loading state.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
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}) 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