Hi Guys, Welcome to Proto Coders Point. In this flutter article let’s understand how to repair cache in flutter.
So you are developing a flutter application & encountered an issue in dependencies cache or the package is broken due to several issues(in the ./pub-cache folder).
To solve this you can simple repair cache by running below command:
flutter pub cache repair

The process of repairing cache in flutter will take minimum 10 seconds or more, depending of how many dependencies package you have & internet speed.
Flutter clear cache
If you are willing to clear/delete cache package, then run below command:
flutter pub cache clean
While deleting the flutter project cache, you will be asked to confirm y/N, Press y:

After successfully above flutter clean, you need to run flutter pub get in your project, it will freshly install all the required plugins.
flutter pub get