InheritedWidget with Scaffold as child doesn’t seem to be working
MyInherited.of(context) will basically look into the parent of the current context to see if there’s a MyInherited instantiated. The problem is : Your inherited widget is instantiated within the current context. => No MyInherited as parent => crash The trick is to use a different context. There are many solutions there. You could instantiate MyInherited … Read more