safeSetState method

void safeSetState(
  1. VoidCallback call
)

Implementation

void safeSetState(VoidCallback call) {
  if (mounted) {
    // ignore: invalid_use_of_protected_member
    setState(call);
  }
}