提交 ef6733d2 authored 作者: 张国庆's avatar 张国庆

修改 list 类型
上级 c8decc92
...@@ -16,8 +16,8 @@ class BaseListWidget extends StatefulWidget { ...@@ -16,8 +16,8 @@ class BaseListWidget extends StatefulWidget {
const BaseListWidget({ const BaseListWidget({
Key? key, Key? key,
required this.requestData, required this.requestData,
required this.pageSize,
required this.itemBuilder, required this.itemBuilder,
this.pageSize = 10,
this.header, this.header,
this.footer, this.footer,
this.startLoadWidget, this.startLoadWidget,
...@@ -210,11 +210,8 @@ class BaseListController { ...@@ -210,11 +210,8 @@ class BaseListController {
get c => _controller; get c => _controller;
} }
typedef RefreshCallback = Future<void> Function(); typedef SuccessCallback = Function(List? list);
typedef LoadMoreCallback = Future<void> Function(); typedef ErrorCallback = Function(dynamic code, String msg);
typedef SuccessCallback = Function(List list);
typedef ErrorCallback = Function(int code, String msg);
typedef RequestDataCallback = Function( typedef RequestDataCallback = Function(
int page, int pageSize, SuccessCallback success, ErrorCallback error); int page, int pageSize, SuccessCallback success, ErrorCallback error);
typedef ItemBuilder = Function( typedef ItemBuilder = Function(BuildContext context, int index, dynamic item);
BuildContext context, int index, dynamic item);
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论