How to Show an Local image till the NetworkImage() Loads Up in flutter?

Ajay Kumar picture Ajay Kumar · Oct 8, 2017 · Viewed 27.4k times · Source
            new CircleAvatar(
                              backgroundColor: Colors.black87,
                              backgroundImage: new NetworkImage(url),
                              radius: 45.0,
                            )

I Want to show a local image in CircleAvatar until the NetworkImage fully loads from the internet.

Answer

Collin Jackson picture Collin Jackson · Oct 9, 2017

You may want to try a FadeInImage wrapped in a ClipOval. FadeInImage provides a placeholder property you can use while the network image is loading.

Note: ClipOval can be expensive if you do it a lot, so use it sparingly.