SimplePageModel class

页面无需数据处理的逻辑时 使用SimplePageModel 即可

Inheritance

Constructors

SimplePageModel.new(BuildContext context)

Properties

context BuildContext
finalinherited
enableLoadMore bool
no setterinherited
errorCode int?
no setterinherited
errorMessage String?
no setterinherited
errorMessageWithCode String
no setterinherited
errorResponse ResponseData?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
pageState LiveData<PageState>
getter/setter pairinherited
refreshController → RefreshController
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state LiveData
finalinherited

Methods

dispose() → void
释放资源
inherited
init() → void
初始化状态
inherited
initData() Future
数初始化页面数据 刷新页面调用refreshData
override
initState() → void
状态初始化
inherited
loading() → void
显示loading
inherited
loadMoreData() Future<bool>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEmpty() → void
没有数据 更新UI
inherited
onError({required ResponseData responseData}) → void
出错 更新UI
inherited
onSuccess() → void
请求数据成功 更新UI
inherited
refreshData([bool needLoading = false]) Future
刷新数据 会重置加载状态
inherited
setState() → void
inherited
toString() String
A string representation of this object.
inherited

Operators

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