enterFullScreen static method
进入全屏模式
Implementation
static Future<void> enterFullScreen() async {
// 如果已经是全屏模式,则直接返回
if (isFullScreen()) return;
// 隐藏状态栏和导航栏
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
// 锁定屏幕方向为横屏
await OrientationUtil.switchToLandscape();
}