title: issue after update Flutter project to Flutter 2.0
body: <p>After update to Flutter 2.0, these files have issues with the methods inheritFromElement,inheritFromWidgetOfExactType.</p>
  <p><a href="https://i.stack.imgur.com/47Elc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/47Elc.png" alt="enter image description here" /></a></p>