I followed the Flutter official doc (https://flutter.dev/docs/development/accessibility-and-localization/internationalization) but came across the same problem as you. I first tried “flutter upgrade”. The issue still remained.
After that, I tried to close my IDE(Android studio) and open it again, and the issue was cleared!