FrankAion Stack Overflow • Recommends
On “Flutter flavor build from Xcode different main.dart”
After many hours of research I finally found the solution.
In the build settings there is a custom setting called "FLUTTER_TARGET" where you have to set the paths to your main.dart files. ALL tutorials and guides completely ignore this.
link to this video
In this guide you can see at the linked time at the bottom of the screen what I mean.