PullToRefreshState<T extends StatefulWidget, DataModel> class abstract

需要用到分页数据请求的页面,继承此类 DataModel 数据源Model

Inheritance

Constructors

PullToRefreshState()

Properties

context BuildContext
The location in the tree where this widget builds.
no setterinherited
dataModelList List<DataModel>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mounted bool
Whether this State object is currently in a tree.
no setterinherited
pageNo int
getter/setter pair
refreshController → RefreshController
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wantKeepAlive bool
Whether the current instance should be kept alive.
no setterinherited
widget → T
The current configuration.
no setterinherited

Methods

activate() → void
Called when this object is reinserted into the tree after having been removed via deactivate.
inherited
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
deactivate() → void
Called when this object is removed from the tree.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
didUpdateWidget(covariant T oldWidget) → void
Called whenever the widget configuration changes.
inherited
dispose() → void
Called when this object is removed from the tree permanently.
inherited
getPageSize() int
每页请求数量
initState() → void
Called when this object is inserted into the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onBuild(BuildContext context) Widget
inherited
onDispose() → void
override
onInitState() → void
inherited
onLoading() → dynamic
!!禁止父类重写此方法!!
onRefresh() → dynamic
!!禁止父类重写此方法!!
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
refreshList(List<DataModel>? list) → dynamic
!!禁止父类重写此方法!! 父类接口请求成功后调用此方法 list 请求成功(list != null),请求失败(list == null)
removeDuplicatesEnabled() bool
是否开启去重复 (默认false; 如果开启,则相应的DataModel需要重写==和hashCode方法才有效)
requestListData() → dynamic
抽象方法(父类复写此方法,请求数据)
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed.
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
updateKeepAlive() → void
Ensures that any AutomaticKeepAlive ancestors are in a good state, by firing a KeepAliveNotification or triggering the KeepAliveHandle as appropriate.
inherited

Operators

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