HasimYerlikaya
HasimYerlikaya

Reputation: 383

Why does the error occur after the Flutter Clean command?

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

After flutter clean

Upvotes: 4

Views: 7439

Answers (2)

Kishan Dhankecha
Kishan Dhankecha

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

kignwill101
kignwill101

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

Related Questions