I have a CustomScrollView Contain a :-
1- SliverToBoxAdapter which have tree of widgets
2- SliverList
The problem is happened when i Wrap SliverList with PageView
its normal because CustomScrollView only accept Slivers
code snippet
CustomScrollView(
slivers: <Widget>[
SliverToBoxAdapter(child : ),
PageView(children: <Widget>[SliverList()])]
run result
A RenderViewport expected a child of type RenderSliver but received a child of type RenderRepaintBoundary. RenderObjects expect specific types of children because they coordinate with their children during layout and paint. For example, a RenderSliver cannot be the child of a RenderBox because a RenderSliver does not understand the RenderBox layout protocol.
I resolved this issue by using NestedScrollView :-
header property have SliverToBoxAdapter it accepts Slivers
body property have PageView it doesn't accept Slivers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With