easyRefresh function
Widget
easyRefresh({
- required dynamic itemCount,
- required IndexedWidgetBuilder itemBuilder,
- EasyRefreshController? controller,
- OnRefreshCallback? refresh,
- OnLoadCallback? load,
- num space = 16,
- bool slide = true,
- bool shrinkWrap = false,
- num mainPadding = 0,
- num crossPadding = 0,
- bool fullLine = true,
- double? cacheExtent,
- Header? header,
Implementation
Widget easyRefresh({
required itemCount,
required IndexedWidgetBuilder itemBuilder,
EasyRefreshController? controller,
OnRefreshCallback? refresh,
OnLoadCallback? load,
num space = 16,
bool slide = true,
bool shrinkWrap = false,
num mainPadding = 0,
num crossPadding = 0,
bool fullLine = true,
double? cacheExtent,
Footer? footer,
Header? header,
}) {
List<Widget> child = [
ListIntervalView(
itemCount: itemCount,
itemBuilder: itemBuilder,
space: space,
fullLine: fullLine,
mainPadding: mainPadding,
crossPadding: crossPadding)
];
return EasyRefresh.custom(
controller: controller,
onRefresh: refresh,
onLoad: load,
shrinkWrap: shrinkWrap,
topBouncing: slide,
bottomBouncing: slide,
footer: footer,
header: header,
cacheExtent: cacheExtent,
slivers: <Widget>[SliverList(delegate: SliverChildListDelegate(child))],
);
}