safeSetState method
void
safeSetState(
- VoidCallback fn
Implementation
void safeSetState(VoidCallback fn) {
try {
if (mounted) {
setState(fn);
}
// ignore: empty_catches
} catch (e) {}
}