have you already tried this? How to Clear Flutter’s Build Cache? Sometimes it is due to either corrupted build files or build cache.
Just a friendly reminder, sometimes, it is better to clean and rebuild the project and test it first before building a prod app build.
Note: I did this when there was not direct issue with the source code that I've declared in my Flutter project codebase (.dart).