fluttercommunity / flutter_blurhash

Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium. Maintainer: @Solido
https://pub.dev/packages/flutter_blurhash
MIT License
513 stars 65 forks source link

slow performance #27

Closed mohammadne closed 3 years ago

mohammadne commented 3 years ago

as a snippet code:

    return ListView.builder(
      itemCount: 100,
      itemBuilder: (_, index) => Container(
        height: 200,
        child: ListView.builder(
          itemCount: 20,
          scrollDirection: Axis.horizontal,
          itemBuilder: (_, index) => BlurHash(
            image: 'https://picsum.photos/200/300',
            color: Colors.red,
            hash: '',
          ),
        ),
      ),
    );

as you can see the performance of using Image.network is very sensible. is there any solution to fix it?

Solido commented 3 years ago

Have a look at the Octo lib which is a package using this lib and adding network cache support.