ClassicFooter class

经典底部加载指示器

这是最常用的加载指示器,结合了文本和图标,支持多种加载状态

主要功能:

  • 支持多种加载状态显示(空闲、可加载、加载中、完成、失败、无更多数据)
  • 可自定义文本、图标、间距和位置
  • 支持国际化文本
  • 支持外部容器自定义

示例用法:

ClassicFooter(
  idleText: "上拉加载更多",
  canLoadingText: "释放加载",
  loadingText: "加载中...",
  noDataText: "没有更多数据",
  failedText: "加载失败",
  iconPos: IconPosition.left,
  spacing: 10.0,
)

相关组件:

Inheritance

Constructors

ClassicFooter({Key? key, VoidCallback? onClick, LoadStyle loadStyle = LoadStyle.showAlways, double height = 60.0, OuterBuilder? outerBuilder, TextStyle textStyle = const TextStyle(color: Colors.grey), String? loadingText, String? noDataText, Widget? noMoreIcon, String? idleText, String? failedText, String? canLoadingText, Widget? failedIcon = const Icon(Icons.error, color: Colors.grey), IconPosition iconPos = IconPosition.left, double spacing = 15.0, Duration completeDuration = const Duration(milliseconds: 300), Widget? loadingIcon, Widget? canLoadingIcon = const Icon(Icons.autorenew, color: Colors.grey), Widget? idleIcon = const Icon(Icons.arrow_upward, color: Colors.grey)})
const

Properties

canLoadingIcon → Widget?
加载状态图标配置
final
canLoadingText → String?
加载状态文本配置
final
completeDuration → Duration
加载完成后显示的持续时间
final
failedIcon → Widget?
加载状态图标配置
final
failedText → String?
加载状态文本配置
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
指示器的视觉高度
finalinherited
iconPos → IconPosition
图标相对于文本的位置
final
idleIcon → Widget?
加载状态图标配置
final
idleText → String?
加载状态文本配置
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingIcon → Widget?
加载状态图标配置
final
loadingText → String?
加载状态文本配置
final
loadStyle → LoadStyle
加载更多显示样式
finalinherited
noDataText → String?
加载状态文本配置
final
noMoreIcon → Widget?
加载状态图标配置
final
onClick → VoidCallback?
用户点击底部时的回调
finalinherited
outerBuilder → OuterBuilder?
外部包装构建器
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spacing → double
图标和文本之间的间距
final
textStyle → TextStyle
文本样式
final

Methods

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