If you have got the subjected issue after flutter upgrade. Then please try the below fix.
Fix: deleting the bin/cache directory in your Flutter installation directory, then run flutter doctor and try again. Usually, it will be C:\src\flutter.
Upgrade flutter if required.
Hope this helps.
If you have not fixed this issue by clearing the directory, let me know through comments. Also, share alternate fixes.
Thanks, Srikanth