safeState method
Implementation
void safeState([VoidCallback? callback]) {
if (mounted) {
setState(callback ?? () {});
} else {
callback?.call();
}
}
void safeState([VoidCallback? callback]) {
if (mounted) {
setState(callback ?? () {});
} else {
callback?.call();
}
}