memCachePixels static method
Converts a logical display size to physical pixels for
CachedNetworkImage.memCacheWidth/memCacheHeight — decoding network
images at their displayed size instead of full resolution is what
keeps the Flutter image cache from accumulating full-size bitmaps
across avatars, favicons, and gallery thumbnails.
Implementation
static int memCachePixels(BuildContext context, double logicalSize) {
return (logicalSize * MediaQuery.devicePixelRatioOf(context)).round();
}