setOrientation static method
此方法用于提供给开发者以更简便的方式取修改设备方向
Implementation
static setOrientation(OrientationMode mode) async {
switch (mode) {
case OrientationMode.landscapeLeft:
await landscapeLeftMode();
break;
case OrientationMode.landscapeRight:
await landscapeRightMode();
break;
case OrientationMode.portraitUp:
await portraitUpMode();
break;
case OrientationMode.portraitDown:
await portraitDownMode();
break;
case OrientationMode.portraitAuto:
await portraitAutoMode();
break;
case OrientationMode.landscapeAuto:
await landscapeAutoMode();
break;
case OrientationMode.fullAuto:
await fullAutoMode();
break;
}
}