Fix large cache size (#437)

* Add custom cache manager

* Fix

* Add cleanup

* Remove prints for debugging

* Remove unnecessary code

* Change nr of max cache objects
This commit is contained in:
Artiu 2025-04-07 04:58:37 +02:00 • committed by GitHub
parent eb3d09749f
commit f72614afa7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 244 additions and 187 deletions

View file

@ -4,6 +4,7 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:frosty/cache_manager.dart';
import 'package:frosty/constants.dart';
import 'package:frosty/models/badges.dart';
import 'package:frosty/models/emotes.dart';
@ -199,6 +200,7 @@ class IRCMessage {
preferBelow: false,
message: 'Sent from ${sourceChannelUser.displayName}',
child: CachedNetworkImage(
cacheManager: CustomCacheManager.instance,
imageUrl: sourceChannelUser.profileImageUrl,
imageBuilder: (context, imageProvider) => Container(
width: badgeSize,