riverpod-eager-initialization
Installation
SKILL.md
Riverpod — Eager initialization
Instructions
Providers are lazy by default: they initialize on first use. There is no built-in "eager" flag (for tree-shaking). To force early initialization, watch the provider at the root of your app so it stays alive and runs immediately.
Approach
Place a Consumer (or ConsumerWidget) directly under ProviderScope that only watches the providers you want to initialize and returns your real app as child:
void main() {
runApp(ProviderScope(child: MyApp()));
}