flutter_orientation icon indicating copy to clipboard operation
flutter_orientation copied to clipboard

How to lock the screen in IOS pad?

Open inprise1980 opened this issue 4 years ago • 3 comments

i use OrientationPlugin.setPreferredOrientations([DeviceOrientation.portraitUp]) OrientationPlugin.forceOrientation(DeviceOrientation.portraitUp);

but not lock the screen orientation, How to solve it?thanks。

inprise1980 avatar Mar 11 '20 06:03 inprise1980

Hi @inprise1980

OrientationPlugin.setPreferredOrientations([DeviceOrientation.portraitUp]);
OrientationPlugin.forceOrientation(DeviceOrientation.portraitUp);

The code works for me in iphone.

May not work on iPad, please refer to the documentation of Limitations section.

sososdk avatar Mar 11 '20 06:03 sososdk

is it any solution about this bug?

FeifanChang avatar Apr 30 '20 06:04 FeifanChang

@FeifanChang

Sososdk's reply is correct. Just follow the documentation

inprise1980 avatar Apr 30 '20 06:04 inprise1980