setScreenOrientation static method
Future<void>
setScreenOrientation({
- List<
DeviceOrientation> orientations = const [DeviceOrientation.portraitUp],
设置屏幕方向
orientations 允许的屏幕方向列表
Implementation
static Future<void> setScreenOrientation({
List<DeviceOrientation> orientations = const [DeviceOrientation.portraitUp],
}) async {
await SystemChrome.setPreferredOrientations(orientations);
}