EaseDevice class
Utility class for accessing device-related information and functionalities.
Provides various utilities to interact with device features such as screen dimensions, orientation, keyboard visibility, taking screenshots, and more.
Constructors
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
-
exitFullScreen(
) → void - Exits full-screen mode.
-
fullScreen(
) → Future< void> - Sets the app to full-screen mode (no buttons, bars, or notifications on top).
-
getPixelDensity(
) → double - Retrieves the pixel density or device pixel ratio.
-
getPlatformLocale(
) → String - Retrieves the platform locale.
-
getPlatformName(
) → String - Retrieves the platform name.
-
getPlatformVersion(
) → String - Retrieves the platform version.
-
getScreenHeight(
) → double - Retrieves the screen height.
-
getScreenSize(
) → Size - Retrieves the screen dimensions.
-
getScreenWidth(
) → double - Retrieves the screen width.
-
hasPhysicalKeyboard(
) → bool - Checks if the device has a physical keyboard.
-
hideKeyboard(
) → void - Hides the software keyboard.
-
isDesktop(
) → bool - Checks if the device is a desktop/laptop.
-
isMobile(
) → bool - Checks if the device is a mobile phone.
-
isOnline(
) → Future< bool> - Checks if the device is connected to the internet.
-
isTablet(
) → bool - Checks if the device is a tablet (based on screen size).
-
openKeyboard(
) → void - Opens the software keyboard.
-
setOrientation(
DeviceOrientation orientation) → Future< void> - Sets the preferred orientation for the app.