`Scaffold(
body: Column(children: [
Search(),
PagedListView<int, dynamic>(
pagingController: controller.pagingCtrl,
padding: EdgeInsets.only(bottom: 25.h),
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
builderDelegate: PagedChildBuilderDelegate<dynamic>(
itemBuilder: (context, item, index) =>
_buildNewsCard(title: item?.title),
firstPageProgressIndicatorBuilder: (_) => _buildNewsCardSkeleton(6),
newPageProgressIndicatorBuilder: (_) => _buildNewsCardSkeleton(6)
)
)
],
)
)`
Expecting to call API Only Once it reach the end of the page on scrolling
>Solution :
Wrap your pagination Widget with A Specific height.
Scaffold(
body: Column(children: [
_buildSearchAndFilterSection(),
SizedBox(
height: 90.w
PagedListView<int, dynamic>(
shrinkWrap: true,
pagingController: controller.pagingCtrl,
padding: EdgeInsets.only(bottom: 25.h),
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
builderDelegate: PagedChildBuilderDelegate<dynamic>(
itemBuilder: (context, item, index) =>
_buildNewsCard(title: item?.title),
firstPageProgressIndicatorBuilder: (_) => _buildNewsCardSkeleton(6),
newPageProgressIndicatorBuilder: (_) => _buildNewsCardSkeleton(6)
)
)
)
],
)
)