switchToLandscape static method
切换到横屏模式
Implementation
static Future<void> switchToLandscape() async {
await SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft, // 左横屏
DeviceOrientation.landscapeRight, // 右横屏
]);
}
切换到横屏模式
static Future<void> switchToLandscape() async {
await SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft, // 左横屏
DeviceOrientation.landscapeRight, // 右横屏
]);
}