Flutter 如何在颤振中自动使用不同的配置文件和调试模式值?
当我发布我的应用程序时,我需要更改一些值。我相信,有更好的解决办法Flutter 如何在颤振中自动使用不同的配置文件和调试模式值?,flutter,dart,debugging,release,Flutter,Dart,Debugging,Release,当我发布我的应用程序时,我需要更改一些值。我相信,有更好的解决办法 class MyModeRelatedVariables { get url => mode == Mode.Profile ? "ap.server.com" : "api.dev.server.com"; } 我使用此脚本发布ios: flutter clean \ && rm ios/Podfile.lock pubspec.lock \
class MyModeRelatedVariables {
get url => mode == Mode.Profile ? "ap.server.com" : "api.dev.server.com";
}
我使用此脚本发布ios:
flutter clean \
&& rm ios/Podfile.lock pubspec.lock \
&& rm -rf ios/Pods ios/Runner.xcworkspace \
&& flutter build ios --release --dart-define=MY_APP_ENV=prod