getDefaultFooter function
Implementation
CustomFooter getDefaultFooter({
String? idle,
String? loading,
String? failed,
String? canLoading,
String? noMore,
}) {
return CustomFooter(
builder: (BuildContext context, LoadStatus? mode) {
Widget body;
if (mode == LoadStatus.idle) {
body = Text(idle ?? "Pull up to load more");
} else if (mode == LoadStatus.loading) {
body = Text(loading ?? "Loading");
} else if (mode == LoadStatus.failed) {
body = Text(failed ?? "load failed");
} else if (mode == LoadStatus.canLoading) {
body = Text(canLoading ?? "Release and load more");
} else {
body = Text(noMore ?? "No more");
}
return SizedBox(
height: 55.0,
child: Center(child: body),
);
},
);
}