Reputation: 383
After using the Flutter Clean command, packages cannot be found and too many errors appear.
After running the "flutter pub get" command, the problems are corrected. It wasn't like this before, what could be the reason for this?
Flutter 2.0.2 • channel stable • Framework • revision 8962f6dc68 (6 days ago) • 2021-03-11 13:22:20 -0800 Engine • revision 5d8bf811b3 Tools • Dart 2.12.1
Upvotes: 4
Views: 7439
Reputation: 1015
Just run flutter pub get
after flutter clean
Command.
By doing that dependencies on pubspec.yaml
file will be updated as well as flutter and dart SDK dependencies.
Upvotes: 3
Reputation: 153
Flutter clean removes all cached packages which your IDE depends on for code completion. So that is why after running flutter pub get
everything goes back to normal as the command re-downloads all the package files the IDE depends on.
Upvotes: 10