Flutter 如何检查Widget是否已mounted
Dec 1, 2022
3 min read
if
(
!
mounted)
return
; setState(() {});
or
if
(mounted) {
//Do something
}; setState(() {});