DeviceOrientationApi class

Device Orientation API 使用原生的旋转方法

Constructors

DeviceOrientationApi()

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 Properties

gravityOrientation Stream<int>
no setter
screenOrientation Stream<int>
no setter

Static Methods

isSensorAvailable() Future<bool>
setAutoOrientationUser() → dynamic
跟随传感器自动旋转,受控制中心的旋转开关控制,且旋转方向受系统判断。(某种设备,无法旋转到反向竖屏)
setGravityUpdateInterval(int interval) → dynamic
setLandscapeLeftUser() → dynamic
临时旋转到横屏,之后跟随传感器自动旋转,受控制中心的旋转开关控制,且旋转方向受系统判断
setLandscapeRightUser() → dynamic
临时旋转到反向横屏,之后跟随传感器自动旋转,受控制中心的旋转开关控制,且旋转方向受系统判断
setPortraitUpMode() → dynamic
仅竖屏显示
setPortraitUser() → dynamic
临时旋转到竖屏,之后跟随传感器自动旋转,受控制中心的旋转开关控制,且旋转方向受系统判断