Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'

Run flutter downgrade

Received same error right after upgrading. Switching from Flutter 1.26.0-12.0.pre • channel dev to the previous verion (1.26.0-8.0.pre) made the build work again

This often happened when working with Dev and master channels, the best monthly picks of master that flutter consider more stable is channel Beta

flutter channel beta

Flutter build release channels

We will branch from master for a new beta release at the beginning of the month, usually the first Monday. This will include a branch for Dart, the Engine and the Framework. This branch will then be "stabilized" for the next couple of weeks, meaning we will accept cherrypick requests for high impact issues. As we near the end of the month and the next beta branch, we will likely reduce the number of cherrypicks we are willing to do. Once a quarter, the beta branch will live on to become the next stable branch, as detailed below.