This happened to me after a git commit fail, I just created a new flutter project and copy pasted the lib folder, and it worked for me