MiuixPullToRefresh class

Miuix 风格下拉刷新容器。

child 应包含一个纵向可滚动组件。短内容若也要接受下拉手势,请为滚动 组件设置 AlwaysScrollableScrollPhysics。Flutter 的滚动通知只能观察、不能像 Compose NestedScrollConnection 一样消费位移;本组件在顶边 overscroll 时驱动 等价状态,并通过增长的头部自然下推内容。

Inheritance

Constructors

MiuixPullToRefresh({Key? key, required bool isRefreshing, required VoidCallback onRefresh, required Widget child, MiuixPullToRefreshController? controller, EdgeInsetsGeometry contentPadding = EdgeInsets.zero, MiuixScrollBehavior? topAppBarScrollBehavior, Color color = MiuixPullToRefreshDefaults.color, double circleSize = MiuixPullToRefreshDefaults.circleSize, List<String> refreshTexts = MiuixPullToRefreshDefaults.refreshTexts, TextStyle refreshTextStyle = MiuixPullToRefreshDefaults.refreshTextStyle, ValueChanged<double>? onPullProgress})
const

Properties

child Widget
final
circleSize double
final
color Color
final
contentPadding EdgeInsetsGeometry
final
controller MiuixPullToRefreshController?
final
hashCode int
The hash code for this object.
no setterinherited
isRefreshing bool
由调用方提升管理的刷新状态。
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onPullProgress ValueChanged<double>?
完整阻尼拖拽范围内的实时进度;挂载时也会调用一次。
final
onRefresh VoidCallback
用户越过阈值并松手后调用;应尽快把 isRefreshing 设为 true。
final
refreshTexts List<String>
final
refreshTextStyle TextStyle
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
topAppBarScrollBehavior MiuixScrollBehavior?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MiuixPullToRefresh>
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, 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

Operators

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