Closed MohamadSobhy closed 2 years ago
I did this workaround and it fixes the issue for me.
bool _isFullScreen = false;
@override
void initState() {
super.initState();
controller.addListener(_listenToFullScreenChanges);
}
@override
void dispose() {
controller.removeListener(_listenToFullScreenChanges);
controller.dispose();
super.dispose();
}
void _listenToFullScreenChanges() {
if (_isFullScreen != controller.isFullScreen) {
_isFullScreen = controller.isFullScreen;
log('isFullScreen: $_isFullScreen');
if (!_isFullScreen) {
// reverting the screen back to portrait mode.
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
}
}
}
Cool :)
Hi,
As you can see in the attached video, The app remains in Landscape mode after clicking on the "full screen" button to get back and see the video in the normal view. The app should back to Portrait mode again. This issue is happening only in iOS.
https://user-images.githubusercontent.com/31019449/147064957-25077349-1e37-4a9e-826b-e9ccca93e84f.mov
Any solution for this?