OrientationUtil class

播放器旋转操作工具类

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getCurrentOrientation() Future<Orientation>
获取当前屏幕方向
lockCurrentOrientation(BuildContext context) Future<void>
锁定屏幕方向为用户当前的方向
switchToLandscape() Future<void>
切换到横屏模式
switchToPortrait() Future<void>
切换到竖屏模式
toggleOrientation() Future<void>
切换屏幕方向(自动在横屏和竖屏之间切换)
unlockOrientation() Future<void>
解锁屏幕方向,允许所有方向