How to resolved Member not found: ‘packageRoot’ how to solve ignore: deprecated_member_use in Flutter?

Root Cause of this problem

  • platform pub is out of date. Most likely in your case it’s a transitive dependency from path_provider pub.
  • For some reason, flutter pub get won’t update platform which is a transitive dependency. Even if you change the version of its parent pub path_provider to the latest version and call flutter pub get again.


First of all try to these command:

  • flutter pub upgrade
  • flutter clean
  • flutter pub get

if cleaning and getting the packages didn’t work. This error started after I upgraded flutter. I was on the master channel, a quick fix for me was to switch to stable

  • flutter channel stable
  • flutter upgrade

and above process didn’t work. then try this:

flutter pub cache repair

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More