perf: fix image loading performance across all screens
- Replace Image.network (no cache) with CachedNetworkImage in contributor_profile_screen - Replace NetworkImage (no cache) with CachedNetworkImageProvider in desktop_topbar and contribute_screen (leaderboard avatars) - Add maxWidthDiskCache + maxHeightDiskCache to all 23 CachedNetworkImage calls - Add missing memCacheWidth/Height to review_card (36x36 avatar) and learn_more related events (140x100) - Add dynamic memCache sizing to tier_avatar_ring based on widget size Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,10 @@ class TierAvatarRing extends StatelessWidget {
|
||||
|
||||
return CachedNetworkImage(
|
||||
imageUrl: _avatarUrl,
|
||||
memCacheWidth: (size * 2).round(),
|
||||
memCacheHeight: (size * 2).round(),
|
||||
maxWidthDiskCache: (size * 4).round(),
|
||||
maxHeightDiskCache: (size * 4).round(),
|
||||
imageBuilder: (context, imageProvider) => CircleAvatar(
|
||||
radius: radius,
|
||||
backgroundImage: imageProvider,
|
||||
|
||||
Reference in New Issue
Block a user