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

Does not work with SliverList #26

Open
nivla360 opened this issue May 11, 2020 · 2 comments
Open

Does not work with SliverList #26

nivla360 opened this issue May 11, 2020 · 2 comments

Comments

@nivla360
Copy link

Was trying it with SliverList but this the error I get:
A RenderViewport expected a child of type RenderSliver but received a child of type _ShimmerFilter.
A RenderViewport expected a child of type RenderSliver but received a child of type RenderErrorBox.

@VictorUvarov
Copy link

VictorUvarov commented May 21, 2020

RenderBoxes can't be used as slivers. I'm not sure if a new widget would have to be created for this package or it can be wrapped in some kind of sliver like SliverToBoxAdapter.

@gabrielCuringa
Copy link

gabrielCuringa commented Dec 31, 2020

This worked for me:

SliverToBoxAdapter(
      child: Shimmer.fromColors(
        baseColor: Colors.grey[300],
        highlightColor: Colors.grey[200],
        child: ListView.builder(
          itemCount: itemCount,
          physics: NeverScrollableScrollPhysics(),
          shrinkWrap: true,
          itemBuilder: (_, __) {
            return ...;
          },
        ),
      ),
    );

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

No branches or pull requests

3 participants