1

I have some questions. How do make lazy loading video or photo from Firebase database like Instagram? I am using NetworkImage() widget.

here example

0

1 Answer 1

5

For lazy loading of the image you can check cached_network_image package. It provides progressIndicatorBuilder for showing the progress of the image load.

For example (taken from the library documentation),

CachedNetworkImage(
    imageUrl: "http://via.placeholder.com/350x150",
    progressIndicatorBuilder: (context, url, downloadProgress) => 
            CircularProgressIndicator(value: downloadProgress.progress),
    errorWidget: (context, url, error) => Icon(Icons.error),
 ),

For video player can check video_player library. If you want use caching feature for video also can check cached_video_player, which is made extending the video_player package.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.