Delete ~/. pub-cache/hosted and/or ~/. pub-cache/git (for Git dependencies) . This requires running flutter packages to get in all active projects on your machine afterward.
Read moreWhat is pub get?
Get is one of the commands of the pub tool . This command gets all the dependencies listed in the pubspec. yaml file in the current working directory, as well as their transitive dependencies.
Read more