I am really sorry to ask for help again but I cannot figure how to get
PageSliverList running correctly
I tried to replace my Columns by sliver list to have a widget tree like the following one:
CustomScrollView - SliverToBoxAdapter(X) - SliverToBoxAdapter(Y) - SliverList - SliverChildListDelegate - X - Y - Column - X - Y - PagedListView
I tried to replace the last instance of
Column but it gets even worse
And I get the following error, I do not have any padding thus I do not understand this problem
The following assertion was thrown building PagedSliverBuilder<int, Transfer>(state: _PagedSliverBuilderState<int, Transfer>#f734f): A RenderConstrainedBox expected a child of type RenderBox but received a child of type RenderSliverPadding. 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. The RenderConstrainedBox that expected a RenderBox child was created by: ConstrainedBox ← Container ← Column ← PiggyBankHistory ← RepaintBoundary ← IndexedSemantics ← NotificationListener<KeepAliveNotification> ← KeepAlive ← AutomaticKeepAlive ← KeyedSubtree ← SliverList ← Viewport ← ⋯ The RenderSliverPadding that did not match the expected child type was created by: SliverPadding ← PagedSliverBuilder<int, Transfer> ← PagedSliverList<int, Transfer> ← ConstrainedBox ← Container ← Column ← PiggyBankHistory ← RepaintBoundary ← IndexedSemantics ← NotificationListener<KeepAliveNotification> ← KeepAlive ← AutomaticKeepAlive ← ⋯ The relevant error-causing widget was: PagedSliverList<int, Transfer>
PageSliverListas a direct child of my
PageSliverListin a widget and it will not work anymore
PagedSliverListdo not work anymore
Hi, I took a brief look at the code. I'm not sure you can do that, although I think you probably do.
Either way, maybe you're too attached to what "logically grouped widgets" mean. I think they're fine just the way they are! That's a price you had to pay because of your "complex" layout requiring you to use Slivers.
I opened a Merge Request for your project where I upgraded it to the new version of the package released this weekend. Now you don't have to subclass anything anymore. It ended up being closer to Flutter. Your code is shorter now. Take a look when you have the time! Thank you so much!
@flo.garibal_gitlab I couldn't rest until I solve your problem!
I went pretty deep on it and found out that this is a feature the Flutter team ended up deprioritizing.
But then a guy decided to make a package out of it, and the result is a MultiSliver widget that does exactly what you need! Make good use of it! ;)