Hiding environment secrets in a Flutter app before deploying to Firebase Hosting involves a few key steps to ensure that sensitive information like API keys or database credentials is not exposed. Here’s a general approach:
Add the .env file to your .gitignore file to prevent it from being committed to your version control system:
.env
For Android, use ProGuard to obfuscate your code, making it harder to reverse-engineer. Enable ProGuard by configuring it in your build.gradle file.
By following these practices, you can better protect your Flutter app’s environment secrets when deploying to Firebase Hosting.