安全刷新
FutureOr<void> safeSetState(FutureOr<dynamic> Function() fn) async { if (mounted && !context.debugDoingBuild && context.owner?.debugBuilding == false) { await fn(); setState(() {}); } }