From 384bf83e35211e76c74d823cc0be20de2d8054c2 Mon Sep 17 00:00:00 2001 From: Shawn Date: Sat, 18 Feb 2023 19:20:11 -0700 Subject: [PATCH] Increase size of img cache --- lib/logic/app_logic.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/logic/app_logic.dart b/lib/logic/app_logic.dart index 93eea3e4..42a5e9b8 100644 --- a/lib/logic/app_logic.dart +++ b/lib/logic/app_logic.dart @@ -34,6 +34,7 @@ class AppLogic { if (PlatformInfo.isDesktop) { await DesktopWindow.setMinWindowSize($styles.sizes.minAppSize); } + // Load any bitmaps the views might need await AppBitmaps.init(); @@ -105,3 +106,11 @@ class AppLogic { SystemChrome.setPreferredOrientations(orientations); } } + +class AppImageCache extends WidgetsFlutterBinding { + @override + ImageCache createImageCache() { + this.imageCache.maximumSizeBytes = 250 << 20; // 250mb + return super.createImageCache(); + } +}