photo_view icon indicating copy to clipboard operation
photo_view copied to clipboard

How can I preload next image?

Open niuhuan opened this issue 3 years ago • 2 comments

I make a on line gallery with photo_view, and implement loading builder.

My imageProvider can download image and cache to local.

I tried download image to cache early, but photo_view display loading widget before scroll over.

Can I preload next 2 image and previous 1 image ?

Like these code

PhotoViewGallery.build(
preloadNext: 2,
preloadPrevious: 1,
);

niuhuan avatar Dec 15 '21 02:12 niuhuan

I make a on line gallery with photo_view, and implement loading builder.

My imageProvider can download image and cache to local.

I tried download image to cache early, but photo_view display loading widget before scroll over.

Can I preload next 2 image and previous 1 image ?

Like these code

PhotoViewGallery.build(
preloadNext: 2,
preloadPrevious: 1,
);

check #457 xd

ghost avatar Dec 15 '21 09:12 ghost

you can use precacheImage, which is what I use in my app.

clragon avatar Dec 31 '21 12:12 clragon