I got an error Error: Entrypoint doesn’t contain a main function Flutter, I tried to restart android studio but it did not work
This worked for me:
When new project is created then got the error
"Entrypoint doesn't contain a main function Flutter".
To resolve this I followed below step
First make sure your flutter and dart sdk paths are properly configured.
You can re-include the files/project root folder.
Goto File -> Project Structure -> Module
And then add the root folder of the project by clicking + icon, then it will detect a flutter app again.
Build the project and check for the error.
Answered By – Ashwini Salunkhe
Answer Checked By – Clifford M. (FlutterFixes Volunteer)