I have my .env like this
APP_NAME=DEV
APP_ID=au.com.myapp.dev
and my env.production like this
APP_NAME=PRO
APP_ID=au.com.myapp.pro
When I run the command flutter build apk --release on Android device I got the application id is au.com.myapp.dev but the app name is PRO. Can any help me explain what is the problem? Ii expect that the application id would be au.com.myapp.pro
My config in gradle likes this
apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle"
project.ext.envConfigFiles = [
staging: ".env.staging",
release: ".env.production",
anothercustombuild: ".env",
]
android {
defaultConfig {
applicationId project.env.get("APP_ID")
versionCode project.env.get("VER_CODE").toInteger()
versionName project.env.get("VER_NAME")
minSdkVersion 24
targetSdkVersion flutter.targetSdkVersion
resValue "string", "build_config_package", "com.example.electronic_vhc"
}
}