我获得了HTTPS中接口返回的错误代码,并通过Provider.of显示了该接口,但是在接口未返回时切换页面以提示此问题
I/flutter (10066): Looking up a deactivated widget's ancestor is unsafe.
I/flutter (10066): At this point the state of the widget's element tree is no longer stable.
I/flutter (10066): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.
如何解决,谢谢