When we run following command
flutter build ipa --dart-define=MY_ENV=testing
it will generate a DART_DEFINES in User-Defined as show in screenshot in Xcode.

MY_ENV=testing is TVlfRU5WPXRlc3Rpbmc= in base64
So we can create a environment variable in Xcode scheme and use it in this DART_DEFINES