Flutter Error: No pubspec.yaml file found.

Flutter Error: No pubspec.yaml file found.

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

image.png

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

image.png run the command again it will run with no error.