Preloading is not real.
When attempting to precache an image using the code provided in the documentation, the images are not actually precached. There is a constant flickering observed when displaying them. This issue occurs starting from version 1.1.6.
New preloading method (1.1.6 and above)
static Future<ByteData> preCacheImage(String svgFilePath) async { try { final loader = SvgAssetLoader(svgFilePath); return await svg.cache.putIfAbsent(loader.cacheKey(null), () => loader.loadBytes(null)); } on Exception { rethrow; } catch (err) { rethrow; } }
Old way <1.1.6 (actually working)
static Future<void> preCacheImage(String svgFilePath) async { try { return await precachePicture( ExactAssetPicture( SvgPicture.svgStringDecoderOutsideViewBoxBuilder, svgFilePath), null, ); } on Exception { rethrow; } catch (err) { rethrow; } }
Please share a complete eample that results in flickering.