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

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

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