DeviceOrientation class abstract

Contains utilities for getting the orientation of the device

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

onOrientationChange ↔ void Function(EOrientation orientation)
Callback called when the orientation change
getter/setter pair
orientation EOrientation
Get the current orientation of the device. If initOrientation has not been called this will be unknown
no setter

Static Methods

disableColors() → void
Disable the colors in the logs if your terminal does not support escape codes
initOrientation({bool useSensor = true}) → void
Call this in an initState near the start of your app