提交 15b0fab8 authored 作者: kongdywang's avatar kongdywang

remove autoOrientation dependence

上级 0130d867
......@@ -17,8 +17,6 @@ dependencies:
sdk: flutter
event_bus: ^2.0.0
auto_orientation: ^2.2.1
flutter_easyloading: ^3.0.0
super_player:
......
......@@ -9,7 +9,6 @@ import 'dart:io';
import 'dart:math';
import 'dart:typed_data';
import 'package:auto_orientation/auto_orientation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
......
......@@ -790,20 +790,17 @@ class FullScreenController {
exitFullScreen();
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: SystemUiOverlay.values);
AutoOrientation.portraitUpMode();
} else if (orientationDirection == TXVodPlayEvent.ORIENTATION_LANDSCAPE_RIGHT) {
enterFullScreen();
SystemChrome.setPreferredOrientations(
Platform.isIOS ? [DeviceOrientation.landscapeRight] : [DeviceOrientation.landscapeLeft]);
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
AutoOrientation.landscapeRightMode();
} else if (orientationDirection == TXVodPlayEvent.ORIENTATION_PORTRAIT_DOWN) {
} else if (orientationDirection == TXVodPlayEvent.ORIENTATION_LANDSCAPE_LEFT) {
enterFullScreen();
SystemChrome.setPreferredOrientations(
Platform.isIOS ? [DeviceOrientation.landscapeLeft] : [DeviceOrientation.landscapeRight]);
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
AutoOrientation.landscapeLeftMode();
}
}
......
......@@ -10,8 +10,6 @@ dependencies:
flutter:
sdk: flutter
auto_orientation: ^2.2.1
flutter_easyloading: ^3.0.0
super_player:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论