ElementListModel<P, ITEM> class
abstract
- Inheritance
-
- Object
- ChangeNotifier
- CusChangeNotifier
- ElementModel<
P> - ElementListModel
Constructors
- ElementListModel(P parent)
Properties
- count → int
-
统计记录数
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isEmptyData ↔ bool
-
getter/setter pair
- isNoMore ↔ bool
-
getter/setter pair
-
items
→ UnmodifiableListView<
ITEM> -
禁止外部改变数据集
no setter
- modelListener → OnBaseModelListener
-
get model listener
no setter
- pageIndex → int
-
获取当前分页索引
no setter
- parent → P
-
no setterinherited
- refreshController ↔ CusRefreshController?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- total → int
-
获取总记录数
no setter
Methods
-
add(
{required ITEM item}) → void -
将item添加到集合中
item
数据模型 -
addAll(
{required List< ITEM> items, bool isClear = false}) → void -
将item添加到集合中
items
数据集合isClear
添加数据至集合前是否需要清空 -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clear(
) → void - 清除数据
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
finishLoad(
) → void -
finishRefresh(
) → void -
finishRequest(
{Map< String, dynamic> ? response}) → void -
分页接口请求完成后执行,配置相关状态
response
分页数据对象,请求失败时不需要传入 -
getItem(
int index) → ITEM - 获取数据类目
-
insert(
{required ITEM item, int? index}) → void -
插件数据至集合中
item
数据模型index
插入数据至集合中指定位置的索引,null或大于items.length将添加至集合末尾。 -
isFirstPage(
Map< String, dynamic> response) → bool - 是否首页数据
-
load(
BuildContext context) → void - 加载数据
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifierLazy(
) → void -
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onInitData(
BuildContext context) → void - 初始化数据
-
refresh(
BuildContext context) → void - 刷新数据
-
removeItem(
{required ITEM item}) → void - 将item从集合中移除 item 要移除的数据
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void - 重置页面属性
-
setSource<
D> (D? data) → void -
inherited
-
showEmptyView(
bool show) → void - 设置空视图隐藏与显示
-
toString(
) → String -
A string representation of this object.
inherited
-
updateAt(
int index, ITEM item) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited