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

1、修改BaseListWidget(canLoadMore是否支持上拉刷新);

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