Unhandled Exception: Looking up a deactivated widget’s ancestor is unsafe.
At this point the state of the widget’s element tree is no longer stable. To safely refer to a widget’s ancestor in its dispose() method, save a reference to the ancestor by calling inheritFromWidgetOfExactType() in the widget’s didChangeDependencies() method.
这是我在flutter代码中想弹出我的弹窗,但是没有正常弹出。这个是有context上下文没有起作用导致的。将传过来的context,之前加一个this.context放到dialog内可以正常弹出dialog。
Unhandled Exception: Looking up a deactivated widget‘s ancestor is unsafe.
最新推荐文章于 2023-11-20 18:29:13 发布