Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support slivers #30

Open
RobertHeim opened this issue Oct 16, 2022 · 9 comments
Open

support slivers #30

RobertHeim opened this issue Oct 16, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@RobertHeim
Copy link

Would be grate if we could do this:

CustomScrollView(
  slivers: [
     ...
  ].animate(interval: 100.ms)
    .move(
      curve: Curves.easeOut,
      duration: 300.ms,
      begin: const Offset(100, 0))
    .fade(duration: 100.ms),
)
@esDotDev
Copy link
Contributor

esDotDev commented Oct 18, 2022

@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?

@gskinner gskinner added the enhancement New feature or request label Oct 22, 2022
@fredgrott
Copy link

Note, the workaround right now is to use the auto_animated package for slivers.

@gskinner
Copy link
Owner

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.

@wesleytoshio
Copy link

Please add support to SliverList

@glin94
Copy link

glin94 commented Apr 30, 2023

+++

@sagar-tide
Copy link

Looking forward to this

@hmirza1
Copy link

hmirza1 commented Mar 16, 2024

Any progress on this?

@btrincao-i9
Copy link

Still looking for any update on this support for slivers

@fredgrott
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants