Open RobertHeim opened 2 years ago
@gskinner I think the issue here is that slivers
must be a list of RenderSliver
children. The compiler misses it, because it accepts List<Widget>
but at some pt a runtime check is performed and it must be List<RenderSliver>
So code like:
CustomScrollView(
slivers: [
SomeSliver();
].animate(interval: 100.ms)
Needs to produce something like:
CustomScrollView(
slivers: [
SliverToBoxAdapter( // This is a `RenderSliver`, so no error will be triggered
child: Animate(
...
child: SomeSliver(),
)
)
]
But I'm not sure that would work properly: would it break the normal behavior of SomeSliver
to have it be nested like that?
Note, the workaround right now is to use the auto_animated package for slivers.
This is a tricky one. I'll try to set up a test file some time soon and play around, but I don't have any specific ideas on how to solve it yet.
Thoughts / ideas / code sketches are welcome.
Please add support to SliverList
+++
Looking forward to this
Any progress on this?
Still looking for any update on this support for slivers
The work around obviously is have your target slivers use a builder delegate...if you look in the MD3 demo app it uses builder delegates for the component screen of slivers. Because it does that I can apply animate and effects to the list of widgets despite it finally rendering to slivers.
Would be grate if we could do this: