Skip to main content

riverpod-ref-read-in-dispose

Fix Riverpod "Using ref when widget is unmounted is unsafe" error in ConsumerStatefulWidget. Use when: (1) Error thrown in dispose() when calling ref.read(), (2) Need to call a service method during widget cleanup, (3) ConsumerStatefulWidget needs to perform actions on provider when user navigates away. Solution: cache the service/notifier in initState with late final.

Aller à l'installation

Informations de source

Dépôt
divinevideo/divine-mobile
Dernière activité de la source
7 août 2026 à 14:43
Langue détectée de SKILL.md
anglais
Étoiles
262
Forks
52

Options d'installation

Le prompt qui vérifie d'abord la source est sélectionné par défaut. Vous pouvez passer à une commande directe ou télécharger une copie locale.

Vérifiez les fichiers source

Lisez SKILL.md et les fichiers associés affichés par SkillsMP avant de décider de l'installer.