perf(tabs): release stale image and tab state
Pixel 10 APK / build (push) Successful in 37m12s

This commit is contained in:
Codex
2026-08-10 17:59:50 +02:00
parent 03227320f4
commit aab2bc0cee
10 changed files with 203 additions and 8 deletions
@@ -75,6 +75,27 @@ void main() {
});
});
testWidgets('tryDecodeImage can bypass the global image cache', (
tester,
) async {
await tester.runAsync(() async {
clearImageCache();
final svgBytes = Uint8List.fromList(utf8.encode(_svgIcon));
final first = await tryDecodeImage(svgBytes, cacheResult: false);
final second = await tryDecodeImage(svgBytes, cacheResult: false);
expect(first, isNotNull);
expect(second, isNotNull);
expect(first, equals(second));
expect(identical(first, second), isFalse);
// These are deliberately distinct uncached image resources.
first!.dispose();
second!.dispose();
});
});
test('ImageIdentity compares structurally, not by a folded hash', () {
const a = (
digest: 0x0123456789ABCDEF,