diff --git a/lib/controller/navigator_controller.dart b/lib/controller/navigator_controller.dart index fbfee4e0..16f8c34d 100644 --- a/lib/controller/navigator_controller.dart +++ b/lib/controller/navigator_controller.dart @@ -155,7 +155,7 @@ class NamidaNavigator { ); } - Future _setOrientations(bool lanscape) async { + Future setDeviceOrientations(bool lanscape) async { isInLanscape = lanscape; final orientations = lanscape ? [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight] : kDefaultOrientations; await SystemChrome.setPreferredOrientations(orientations); @@ -189,7 +189,7 @@ class NamidaNavigator { setDefaultSystemUIOverlayStyle(semiTransparent: true); await Future.wait([ - if (setOrientations) _setOrientations(true), + if (setOrientations) setDeviceOrientations(true), SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky), ]); } @@ -200,7 +200,7 @@ class NamidaNavigator { setDefaultSystemUIOverlayStyle(); await Future.wait([ - if (isInLanscape) _setOrientations(false), + if (isInLanscape) setDeviceOrientations(false), setDefaultSystemUI(), ]); diff --git a/lib/ui/widgets/video_widget.dart b/lib/ui/widgets/video_widget.dart index 9211f03f..e4d47d2e 100644 --- a/lib/ui/widgets/video_widget.dart +++ b/lib/ui/widgets/video_widget.dart @@ -1273,6 +1273,20 @@ class NamidaVideoControlsState extends State with TickerPro child: Row( children: [ const SizedBox(width: 2.0), + if (widget.isFullScreen) + // -- rotate screen button + NamidaIconButton( + horizontalPadding: 0.0, + padding: EdgeInsets.zero, + iconSize: 20.0, + icon: Broken.rotate_left_1, + iconColor: itemsColor, + onPressed: () { + _startTimer(); + NamidaNavigator.inst.setDeviceOrientations(!NamidaNavigator.inst.isInLanscape); + }, + ), + if (widget.isFullScreen) SizedBox(width: widget.isFullScreen ? 12.0 : 10.0), RepeatModeIconButton( compact: true, color: itemsColor, diff --git a/pubspec.yaml b/pubspec.yaml index fed5bdeb..d9012e95 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: namida description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter publish_to: "none" -version: 2.1.5-beta+240509177 +version: 2.1.6-beta+240509199 environment: sdk: ">=3.1.4 <4.0.0"