Running flutter run -t my_main.dart after running monarch run will load the Monarch main file instead of the given target, e.g. my_main.dart.
This issue only affects users of Monarch running Flutter version 2.5.x and whose projects use certain plugins. Previous Flutter versions work as expected.
Workaround: delete file .dart_tool/flutter_build/generated_main.dart before running flutter run.
Steps to reproduce
You are on Flutter 2.5.x
Your project uses a package like path_provider which uses plugins
Run monarch run
Wait for Monarch to load your stories
Run flutter run -t my_main.dart, where my_main.dart is the main file of your app
The app will load Monarch's main file and you will see some Monarch messages printed on the terminal. The expected behavior is that flutter run -t my_main.dart should load my_main.dart.
Running
flutter run -t my_main.dart
after runningmonarch run
will load the Monarch main file instead of the given target, e.g.my_main.dart
.This issue only affects users of Monarch running Flutter version 2.5.x and whose projects use certain plugins. Previous Flutter versions work as expected.
This issue is due to a Flutter issue, when https://github.com/flutter/flutter/issues/90920 is fixed, this issue will be fixed as well.
Workaround: delete file
.dart_tool/flutter_build/generated_main.dart
before runningflutter run
.Steps to reproduce
path_provider
which uses pluginsmonarch run
flutter run -t my_main.dart
, wheremy_main.dart
is the main file of your appflutter run -t my_main.dart
should loadmy_main.dart
.