flutter-pre-caching
Use when preloading fonts, asset/network images, Lottie/Rive animations, local JSON/config, warming initial API data, or optimizing Flutter Web startup.
npx skills add evanca/flutter-ai-rules --skill flutter-pre-caching --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Pre-caching in Flutter and Flutter Web Pre-caching helps avoid jank, loading flashes, font swaps, and delayed first renders. The key rule: > Pre-cache only what the user will likely see in the next 1 to 2 screens. Do not pre-cache the whole app. That can slow startup and waste memory. --- ## 1. Google Fonts ### Runtime Google Fonts preloading Use `GoogleFonts.pendingFonts()` to load the font variants before showing text. ```dart import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; class ExampleSimple extends StatefulWidget { const ExampleSimple({super.key}); @override State<ExampleSimple> createState() => _ExampleSimpleState(); } class _ExampleSimpleState extends State<ExampleSimple> { late final Future<List<void>> googleFontsPending; @override void initState() { super.initState(); googleFontsPending = GoogleFonts.pendingFonts([ GoogleFonts.poppins(), GoogleFonts.montserrat(fontStyle: FontStyle.italic), ]); } @override Widget build(BuildContext context) { final pushButtonTextStyle = GoogleFonts.poppins( textStyle: Theme.of(context).textTheme.headlineMedium, ); final counterTextStyle = GoogleFonts.montserrat( fontStyle: FontStyle.italic, textSty
- 1. Google Fonts
- Runtime Google Fonts preloading
- Production recommendation
- 2. Asset images
- 3. Network images
- 4. Multiple image preloading
- 5. Waiting until images are ready
- 6. What should normally be pre-cached on app start?
- 7. Practical app-start preloader
- 8. Local JSON / config preloading
- 9. Initial API request warm-up
- 10. Lottie preloading
- 11. Rive preloading
- 12. Shader warm-up
What does the flutter-pre-caching skill do?
Use when preloading fonts, asset/network images, Lottie/Rive animations, local JSON/config, warming initial API data, or optimizing Flutter Web startup.
How do I install it?
Run `npx skills add evanca/flutter-ai-rules --skill flutter-pre-caching --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From evanca/flutter-ai-rules, a repository with 604 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
