Flutter Performance
ASecurityThe memory spike is most likely from decoding and caching too many full-resolution catalog images at once. Recommended fixes: - Resize images at load time instead of keeping original dimensions in memory. Set `memCacheWidth` / `memCacheHeight` or `maxWidth` / `maxHeight` based on the rendered card size. - Use `CachedNetworkImage` so repeated scrolling does not redownload assets, but keep cache dimensions constrained. - Render catalog items with `ListView.builder` so off-screen items are recyc...
- 584 stars
- 0 votes
- 0 copies
- 4 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 12 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill flutter-performance --agent claude-codeAre you the author of Flutter Performance?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-flutter-performance-2ae86c4f)The memory spike is most likely from decoding and caching too many full-resolution catalog images at once.
Recommended fixes:
- Resize images at load time instead of keeping original dimensions in memory. Set `memCacheWidth` / `memCacheHeight` or `maxWidth` / `maxHeight` based on the rendered card size.
- Use `CachedNetworkImage` so repeated scrolling does not redownload assets, but keep cache dimensions constrained.
- Render catalog items with `ListView.builder` so off-screen items are recycled instead of all staying alive.
- Paginate the catalog, ideally around 20 items per page, rather than loading the entire image-heavy dataset at once.
- Avoid heavy image-related work in `build()` and keep item widgets as `const` where possible to reduce rebuild pressure.
- If thumbnails are still expensive, generate smaller server-side variants and load those in the list instead of full-res originals.
Example:
```dart
CachedNetworkImage(
imageUrl: product.thumbnailUrl,
memCacheWidth: 300,
maxWidthDiskCache: 300,
fit: BoxFit.cover,
)
```
If the issue persists after resizing, profile image cache usage first—the bottleneck is usually oversized decoded bitmaps, not the widget tree itself.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
- trigger-5.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.