Closed gzlock closed 1 year ago
I've set up main_dev.dart and main_prod.dart to differentiate between development and production environments.
main_dev.dart
import 'main.dart' void main(){ /// set some dev variables. runMain(); }
main_prod.dart
import 'main.dart' void main(){ /// set some prod variables. runMain(); }
main.dart
runMain(){ WidgetsFlutterBinding.ensureInitialized(); runApp(...); }
So I can use flutter build windows --target=./lib/main_prod.dart to build the application production version.
flutter build windows --target=./lib/main_prod.dart
But it not work with dart run msix:create --target=./lib/main_prod.dart
dart run msix:create --target=./lib/main_prod.dart
So I hope the dart run msix:create command can set the entry file like the flutter build windows --target=./lib/main_prod.dart.
dart run msix:create
Windows 10
Hello @gzlock
Please try the windows_build_args config (under the "Build configuration (click to expand)").
windows_build_args
@gzlock add this to msix_config in pubspec.yaml windows_build_args: --target=lib\main_dev.dart
:speech_balloon: Description
I've set up main_dev.dart and main_prod.dart to differentiate between development and production environments.
main_dev.dart
main_prod.dart
main.dart
So I can use
flutter build windows --target=./lib/main_prod.dart
to build the application production version.But it not work with
dart run msix:create --target=./lib/main_prod.dart
So I hope the
dart run msix:create
command can set the entry file like theflutter build windows --target=./lib/main_prod.dart
.:question: Platform
Windows 10