be portrait and only camera page should be both possibilities. But when i use my camera page after that every screen has both possibilities. I tried to implement some kind of logic with bloc and go_router, but it didnt help
you can put this code in your build to disable the landscape mode . SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); And after navigating to your camera screen you can use this code to reset the Orientation setting SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight, ]);
I do it already and ot works, but as soon as i go forward to next screen i can then always use landscspe and portrait...
Обсуждают сегодня