setStateSafe method Null safety
- dynamic fn
Will call setState
only if the current lifecycle state allows it
Implementation
void setStateSafe(VoidCallback fn) {
if (_debugLifecycleState != StateLifecycle.defunct) {
setState(fn);
}
}
Will call setState
only if the current lifecycle state allows it
void setStateSafe(VoidCallback fn) {
if (_debugLifecycleState != StateLifecycle.defunct) {
setState(fn);
}
}