You are a new learner like me and maybe after a day's break you come back to practice flutter. You open the folder you were working on and run the command
flutter run
and you find error
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
You must be working in the wrong folder.
Alright!
Let me explain you with screenshots if that helps.
Here's the screenshot of my ide where I got the error
As you see though my codes are in the right folder but the terminal shows that I am not in the right folder.
Once I am in the right folder and
run the command again it will run with no error.