xxxxxxxxxx
void main() {
WidgetsFlutterBinding.ensureInitialized();
// For device orientation to work
/*
https://stackoverflow.com/questions/50322054/flutter-how-to-set-and-lock-screen-orientation-on-demand
https://www.flutterbeads.com/change-lock-device-orientation-portrait-landscape-flutter/
*/
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]).then(
(value) => runApp(const MyApp()),
);
runApp(MyApp()); // I don't know why I need this line again...
}