if (_viewPlayerController != null) {
// await _viewPlayerController.fullScreen(
//
// );
}
setState(() {
_isFullScreen = !_isFullScreen;
});
if (_isFullScreen) {
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
]);
// setState(() {
// _rotation = pi ; // rotate 90 degrees
// });
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
// overlays: SystemUiOverlay.bottom,
overlays: SystemUiOverlay.values,
);
} else {
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: SystemUiOverlay.values,
);
}