Screens class
Screens utils with multiple properties access. 获取屏幕各项属性的工具类
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
- bottomSafeHeight → double
-
Bottom offset in the ui.window, usually is the action bar/navigation bar size.
从 ui.window 获取的底部偏移(间距),通常是操作条/导航条的大小。
no setter
- height → double
-
The vertical extent of this size.
垂直范围的大小
no setter
- heightPixels → int
-
The vertical pixels of this size.
垂直范围的像素值
no setter
- mediaQuery → MediaQueryData
-
Get MediaQueryData from ui.window
通过 ui.window 获取 MediaQueryData
no setter
- safeHeight → double
-
Height exclude top and bottom safe height.
去除顶部和底部安全区域的高度
no setter
- scale → double
-
The number of device pixels for each logical pixel.
设备每个逻辑像素对应的dp比例
no setter
- textScaleFactor → double
-
Scale factor for the text.
文字缩放的倍数
no setter
- topSafeHeight → double
-
Top offset in the ui.window, usually is the notch size.
从 ui.window 获取的顶部偏移(间距),通常是刘海的大小。
no setter
- width → double
-
The horizontal extent of this size.
水平范围的大小
no setter
- widthPixels → int
-
The horizontal pixels of this size.
水平范围的像素值
no setter
Static Methods
-
fixedFontSize(
double fontSize) → double - Return a fixed font size according to text scale factor. 根据文字缩放计算出的固定文字大小
-
updateStatusBarStyle(
SystemUiOverlayStyle style) → void - Method to update status bar's style. 更新状态栏样式的方法