Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe
Closed this issue · 1 comments
shaoting0730 commented
[VERBOSE-2:ui_dart_state.cc(148)] 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.
@OverRide
Widget build(BuildContext context) {
return ScopedModelDescendant(
builder: (context, child, model) {
return Scaffold(
.....
ScopedModel.of(context, rebuildOnChange: true)
.setUDID(udid);
kishan2612 commented
@pheromone Looks lke context of the widget is gone. Check whether you are disposing the context before setUDID