systemScreenOrientation function

Future<void> systemScreenOrientation({
  1. required List<DeviceOrientation> orientations,
})

设置屏幕方向 DeviceOrientation.portraitUp - 竖屏 DeviceOrientation.landscapeLeft - 横屏 当 orientations 为空时跟随系统。

Implementation

Future<void> systemScreenOrientation(
    {required List<DeviceOrientation> orientations}) async {
  return SystemChrome.setPreferredOrientations(orientations);
}