提交 d6354945 authored 作者: shixiaochen's avatar shixiaochen

1、修改BaseListWidget,回退代码(增加canLoadMore属性);

上级 348ac81e
......@@ -13,6 +13,7 @@ class BaseListWidget extends StatefulWidget {
final Footer? footer;
final Widget? startLoadWidget;
final Widget? emptyWidget;
final bool canLoadMore;
final BaseListController? controller;
final bool refreshOnStart; // 首次展示列表是否刷新数据
......@@ -26,6 +27,7 @@ class BaseListWidget extends StatefulWidget {
this.startLoadWidget,
this.controller,
this.emptyWidget,
this.canLoadMore = true, // 是否支持上拉刷新
this.refreshOnStart = true,
}) : super(key: key);
......@@ -96,7 +98,7 @@ class _BaseListWidgetState extends State<BaseListWidget> {
},
),
onRefresh: _onRefresh,
onLoad: _onLoad,
onLoad: widget.canLoadMore ? _onLoad : null,
child: buildScrollView(),
),
// 列表刷新时,增加透明遮罩,禁止滚动列表
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论