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 frompath_provider
pub.- For some reason,
flutter pub get
won’t updateplatform
which is a transitive dependency. Even if you change the version of its parent pubpath_provider
to the latest version and callflutter pub get
again.
Solutions:
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