flutter将应用设置为坚屏

发布时间:2022-02-04 21:34:29

将flutter 应用设置为坚屏

void main() {
  WidgetsFlutterBinding.ensureInitialized(); //必须要添加这个进行初始化 否则下面会错误
  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
      .then((_) {
    runApp(MyApp());
  });
}

Card image cap
应用宝
Card image cap
APP STORE
Card image cap
应用宝
Card image cap
小米