07-21-2023, 06:38 PM
I would like to prevent my application from changing its orientation and force the layout to stick to "portrait".
In the main.dart, I put:
void main(){
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown
]);
runApp(new MyApp());
}
but when I use the Android Simulator rotate buttons, the layout "follows" the new device orientation...
How could I solve this?
Thanks
In the main.dart, I put:
void main(){
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown
]);
runApp(new MyApp());
}
but when I use the Android Simulator rotate buttons, the layout "follows" the new device orientation...
How could I solve this?
Thanks