DeviceTools class

Tools to control the device orientation and screen size and more

Constructors

DeviceTools.new()

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

screenSize Size?
Returns the current screen size (Size) using MediaQuery.
no setter

Static Methods

closeKeyboard() → void
Closes the soft keyboard if it is currently open.
closePage({dynamic data}) → dynamic
Closes the current page and optionally returns data to the previous page.
setDeviceOrientation({OrientationType orientation = OrientationType.portrait}) Future
Sets the preferred device orientation to portrait or landscape mode.