Build app by multiple environments in Flutter using Android Studio/Xcode

I need to run my Flutter app in multiple backend environments. For instance

DEV environment -> my backend url is https://dev.com

PRO environment -> https://pro.com.

I use Android Studio/Xcode to config build type for each environment (dev/pro) and build into apk/ipa. The problem is I have no idea on how the config for flutter code is relevant to the config in Android Studio/Xcode. What is the right way to solve my problem? Can anyone explain me what I need to do?

This is my config in Android Studio

buildTypes {
        release {
            signingConfig signingConfigs.release
        }
        dev {
            initWith release
            applicationIdSuffix ".dev"
        }
        pro {
            initWith release
        }
    }

Upvotes: 0

Views: 54

Answers (0)

Related Questions