.NET maui always gives the original orientation even after changing the orientation on android emulator

This is kind of silly but private void OnButtonClicked(object sender, EventArgs e) { Shell.Current.DisplayAlert("Orientaion", DeviceDisplay.Current.MainDisplayInfo.Orientation.ToString(), "OK"); } always gives "portrait" (with a phone emulator) or "landscape" (with a tablet emulator) even after I switch the orientation. It just gives the default orientation even after the emulator succesfully changes it. What am I missing ? Thank… Read More .NET maui always gives the original orientation even after changing the orientation on android emulator

Block landscape mode in flutter only for one page | Flutter

I want to block the landscape mode for some pages in my application and that page should always be in portrait. I Tried some code but that make entire application portrait. >Solution : In initState you can set portrait like following. @override void initState() { super.initState(); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, ]); } Then on dispose method you… Read More Block landscape mode in flutter only for one page | Flutter