Closed 3kdeveloper closed 3 days ago
Yes . I am getting the same error too
PagedListViewWidget
is already a scrollable Widget and cannot be placed inside another scrollable Widget.
You dont need to do this, and you shouldnt.
If you need to have other elements that scroll with the Paged widget, you can use a CustomScrollView
plus the corresponding Paged Sliver variant, like PagedSliverList
.
PagedListViewWidget
is already a scrollable Widget and cannot be placed inside another scrollable Widget. You dont need to do this, and you shouldnt. If you need to have other elements that scroll with the Paged widget, you can use aCustomScrollView
plus the corresponding Paged Sliver variant, likePagedSliverList
.
Yes, scrollability is already available in the pagination list view, but since I want visibility under the bottom bar on my screen, I need to make a scaffold extend body true and wrap it with a scroll view. When you do it this way, it automatically sends requests one after the other.
I want a view like this:
If I don't use scroll view, I get an image like this:
When I use PagedListView outside SingleChildScrollView it works fine. It fetches the data when I scroll to the bottom, See the code below.
PagedListViewWidget(
pagingController: _pagingController,
padding: EdgeInsets.symmetric(vertical: 20.pv),
itemBuilder: (context, transfer, index) => BookingTileWidget(
transfer: transfer,
pagingController: _pagingController,
index: index,
),
placeHolderWidget: Padding(
padding: EdgeInsets.only(bottom: 50.pv),
child: PlaceHolderWidget(
child: BookingTileWidget(
transfer: TransferModel(),
pagingController: _pagingController,
index: -1,
),
),
),
),But when I put it inside SingleChildScrollView it fetches all data page by page (on first attempt) without any scrolling o.
SingleChildScrollView(
physics: const BouncingScrollPhysics(),
child: Column(
children: [
PagedListViewWidget(
pagingController: _pagingController,
padding: EdgeInsets.symmetric(vertical: 20.pv),
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, transfer, index) => BookingTileWidget(
transfer: transfer,
pagingController: _pagingController,
index: index,
),
placeHolderWidget: Padding(
padding: EdgeInsets.only(bottom: 50.pv),
child: PlaceHolderWidget(
child: BookingTileWidget(
transfer: TransferModel(),
pagingController: _pagingController,
index: -1,
),
),
),
),
],
),
)