ScreenUtil class

Constructors

ScreenUtil()

Properties

brightness Brightness
no setter
densityDpi int
only in android
no setter
ensureSizeCompleter Completer
getter/setter pair
fontScale double
no setter
hashCode int
The hash code for this object.
no setterinherited
bottom bar Height dp
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
screen density 屏幕 像素密度
no setter
screenHeight double
screen height 屏幕 高 dp
no setter
screenWidth double
screen width 屏幕 宽 dp
no setter
statusBarHeight double
status bar Height 状态栏高度 dp
no setter
windowHeight double
screen width 屏幕 宽 dp
no setter
windowWidth double
screen width 屏幕 宽 dp
no setter

Methods

ensurePhysicalSizeReady() Future<void>
initScreen({ScreenInfoSource screenInfoSource = ScreenInfoSource.flutter}) Future<void>
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

getBottomBarH(BuildContext context) double
status bar Height 当前BottomBar高度
getFontScale(BuildContext context) double
screen density 当前屏幕 字体scale大小
getInstance() ScreenUtil
getMediaQueryData(BuildContext context) MediaQueryData
当前MediaQueryData
getOrientation(BuildContext context) Orientation
Orientation 设备方向(portrait, landscape)
getScreenDensity(BuildContext context) double
screen density 当前屏幕 像素密度
getScreenH(BuildContext context) double
screen height 当前屏幕 高 dp
getScreenW(BuildContext context) double
screen width 当前屏幕 宽 dp
getStatusBarH(BuildContext context) double
status bar Height 当前状态栏高度