Trying to google this yields thousands of unrelated articles, such as setting or locking a specific orientation.
My question is, while the orientation for the phone is locked in say, portrait mode, but the screen is turned sideways, is there way to detect this shift and adjust widgets on the screen in response?
Something like
if (MediaQuery.of(context).orientation == Orientation.portrait) {
return Text('text', style: TextStyle(fontSize: 200));
} else {
return Text('flipped text', style: TextStyle(fontSize: 200));
}
does not work. Same thing with OrientationBuilder - these seem to rely on what mode the phone thinks it's in.
I see there is the sensors package and I'm sure I could get it to work eventually, but it kinda feels like killing a mosquito with a bazooka. I'm hoping there's something simple I've missed when trying to google this issue.