Closed waletoyo1 closed 2 years ago
It can be achieved with CachedNetworkImage
. You can add a shimmer while the image is being loaded by setting placeholder
in the widget. It depends on how you are implementing each item inside the itemBuilder
.
Thanks, I was able to achieve using this method: CachedNetworkImage( imageUrl: 'imageUrl', imageBuilder: (context, imageProvider) => Container( decoration: BoxDecoration( image: DecorationImage( image: imageProvider, fit: BoxFit.cover, ), ), ), placeholder: (context, url) => CircularProgressIndicator(), errorWidget: (context, url, error) => Icon(Icons.error), ),
But how do ensure the image has looaded before showing the text?
The placeholder
accepts any Widget. You can put your text widget inside that as well and shimmer it.
Hi, how can this package be used to preload firebase storage assests like images and videos before building the widget? and displaying a skeleton text while loading. I wanted using it with this package: https://pub.dev/packages/skeleton_text