出現(xiàn)異常。
FlutterError (setState() called after dispose(): _InfoWidgetState#cbf03(lifecycle state: defunct, not mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().)
這個(gè)錯(cuò)誤是因?yàn)楫?dāng)調(diào)用頁面時(shí),當(dāng)前頁面已經(jīng)銷毀了鳍贾“柏遥可以通過查看堆棧信息。來判斷頁面調(diào)用的位置去排查問題骑科。
在這個(gè)位置中查看橡淑,也可以點(diǎn)擊上一步按鈕查看代碼崩潰位置。