golden_test_cached_network_image 1.0.0
golden_test_cached_network_image: ^1.0.0 copied to clipboard
Makes CachedNetworkImage work in golden_test golden tests: serves a placeholder from an in-memory cache, with no SQLite or platform channels.
1.0.0 #
Initial release.
GoldenTestCacheManager— an in-memoryBaseCacheManagerthat serves thegolden_testplaceholder image, with no SQLite and no platform channels, soCachedNetworkImageresolves inside Flutter's fake-async test zone instead of hanging. Entries are addressed by cache key, soCachedNetworkImage(cacheKey:)works andFileInfo.originalUrlstill reports the URL.setupGoldenTestCachedNetworkImage()— one call influtter_test_config.dartinstalls the manager for every golden test.cacheManagerBuilder— optional hook to supply your ownBaseCacheManager, built fresh per test so cache state can't leak between them.