cupertino_load_more

Creator: coderz1093

Last updated:

0 purchases

cupertino_load_more Image
cupertino_load_more Images

Languages

Categories

Add to Cart

Description:

cupertino load more

a CupertinoSliverRefreshControl like load more sliver
Features #

support CustomerScrollView
support autoload and preload(only if cacheExtent > 0)
similar to CupertinoSliverRefreshControl useage

Demo #
online demo
Usage #
late ValueNotifier<int> _count;
Future<void> loadMore() async {
await Future.delayed(const Duration(seconds: 1));
_count.value = _count.value + 8;
}
CustomScrollView(slivers: [
ValueListenableBuilder(
valueListenable: _count,
builder: (c, value, _) {
return SliverList(
...
]));
}),
LoadMoreController(onLoad: loadMore),
]);
copied to clipboard
Additional information #
CustomScrollView(
cacheExtent: 500,
slivers: [
LoadMoreController(
onLoad: loadMore,
autoLoad: true,
)
],
);
copied to clipboard
if the autoLoad argument be true:

onLoad will be called when viewport not filled
onLoad will be called when the LoadMoreController
reach the cacheExtent of the viewport, cacheExtent can be modified to control the preloading timing

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.