Had this issue, I couldn't even run a new project built with Flutter 3.10 itself.
I use VSCode so all I had to do, is to the settings and search for Additional, check you'll find this.
Remove the --no-sound-null-safety
and also had to go into settings.json and remove another flag related to null safety,
Now I can build with no problem!