getOrientation static method
Orientation 设备方向(portrait, landscape)
Implementation
static Orientation getOrientation(BuildContext context) {
var mediaQuery = MediaQuery.of(context);
return mediaQuery.orientation;
}
Orientation 设备方向(portrait, landscape)
static Orientation getOrientation(BuildContext context) {
var mediaQuery = MediaQuery.of(context);
return mediaQuery.orientation;
}