krefreshBuilder function
Widget
krefreshBuilder(
- Widget child,
- AbsPageLogic logic, {
- bool enableRefresh = true,
- bool enableUp = true,
- Header? header,
下拉刷新和上拉加载
child
子控件
enableRefresh
是否启用下拉刷新
enableUp
是否启动上拉加载
Implementation
Widget krefreshBuilder(
Widget child,
AbsPageLogic logic, {
bool enableRefresh = true,
bool enableUp = true,
Header? header,
Footer? footer,
}) {
return EasyRefresh.builder(
childBuilder: (BuildContext context, ScrollPhysics physics) {
return child;
},
onRefresh: enableRefresh ? logic.onRefresh : null,
onLoad: enableUp ? logic.onLoadMore : null,
header: header,
footer: footer,
controller: logic.refreshController,
);
}