Closed RoyalCoder88 closed 2 years ago
I found a solution:
Widget _blurHashImage() { return SizedBox( width: double.infinity, child: CachedNetworkImage( placeholder: (context, url) => const AspectRatio( aspectRatio: 1.6, child: BlurHash(hash: 'LEHV6nWB2yk8pyo0adR*.7kCMdnj'), ), imageUrl: 'https://blurha.sh/assets/images/img1.jpg', fit: BoxFit.cover, ), ); }
It's possible to use CachedNetworkImage with flutter_blurhash ?
CachedNetworkImage( imageUrl: widget.imageUrls[0], height: MediaQuery.of(context).size.height * 0.5, width: MediaQuery.of(context).size.width, fit: BoxFit.cover, placeholder: (context, url) => const Padding( child: CupertinoActivityIndicator(), padding: EdgeInsets.all(20.0)), errorWidget: (context, url, error) => const Icon(Icons.error), );
thanks in advance!