【发布时间】:2020-12-24 12:41:44
【问题描述】:
我正在尝试在运行我的应用程序后为平板电脑设置横向方向,始终以纵向模式运行,这就是我所做的:
void main() {
WidgetsFlutterBinding.ensureInitialized();
// Set landscape orientation
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
runApp(MyApp());
}
【问题讨论】: