Flutter-Demos icon indicating copy to clipboard operation
Flutter-Demos copied to clipboard

Looking up a deactivated widgets ancestor is unsafe

Open wyklif opened this issue 6 years ago • 4 comments
trafficstars

Hi, thanks for the wonderful tutorial. I keep getting the error looking Up a deactivated widgets ancestor is unsafe. At this point the state of the element tree is no longer stable to safely refer to a widget's ancestor in it's dispose() method, save a reference to the ancestor by calling InheritFromWidgetOfExactType() in the widget's didChangeDependancies() method

This occurs during clicking save when creating a new note and it tries to pop back to the notelist view

wyklif avatar Jan 25 '19 19:01 wyklif

hello, did you find a solution for this error ?

umayyah avatar Mar 26 '19 06:03 umayyah

Hi Friends, Pls use this below code or only need to remove "context: context" from showDialog inside node_details.dart,

showDialog(
    //context: context, 
    builder: (_) => alertDialog
);

Now it's working fine.

cseshubham avatar Apr 14 '19 06:04 cseshubham

Nope it's still not working.

Rizwankhan12 avatar May 21 '19 09:05 Rizwankhan12

thanks for the tutorials

Thaajwer avatar Jul 09 '19 10:07 Thaajwer