ImageCache large images

Summary

Context

Description of change

Migration guide

Timeline

References

Summary

The maxByteSize of the ImageCache is no longer
automatically made larger to accommodate large images.

Context

Previously, when loading images into the ImageCache
that had larger byte sizes than the ImageCache’s maxByteSize,
Flutter permanently increased the maxByteSize value
to accommodate those images.
This logic sometimes led to bloated maxByteSize values that
made working in memory-limited systems more difficult.

Description of change

The following “before” and “after” pseudocode demonstrates
the changes made to the ImageCache algorithm:

// Old logic pseudocode

void

onLoadImage

Image

image

if

image