Open nivla360 opened 4 years ago
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.
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 ...;
},
),
),
);
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.