(lifecycle state: defunct, not mounted) flutter code example Example: lifecycle state: defunct, not mounted void setStateIfMounted(f) { if (mounted) setState(f); }