I'm making a quiz-type app for Android & iOS, which is art oriented. This means that image resolution is very important. Client provided ~30 images, 25mb each on average. I can probably get away with compressing them to about 4mb each. After that, loss becomes noticeable.
My main problem is that the images (assets) seem to load too slow. Every time the screen changes to the next one, the image needs > 300 ms to show.
Precaching the images doesn't seem to help.
Widget build(BuildContext context) {
precacheImage(Image.asset(data["painting-location"]).image, context);
return Scaffold(
appBar: null,
backgroundColor: Color(bgColor),
body: ...
PinchZoomImage(image: Image.asset(data["painting-location"]),),
...
);
}
I have also tried precaching in didChangeDependencies()
but i get the same result.
Are the images just too large, or am I missing something as far as precaching goes?
UPDATE I got away with compressing the images to less than 500 kb each and loading times are now acceptable.