ScreenUtil class
Constructors
- ScreenUtil()
-
factory
Properties
- bottomBarHeight → double
-
底部安全区距离
no setter
- context ↔ BuildContext
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- pixelRatio → double
-
设备的像素密度
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleHeight → double
-
实际尺寸与UI设计的高度比例
no setter
- scaleText → double
-
文本缩放比,取宽高比例最小值
no setter
- scaleWidth → double
-
实际尺寸与UI设计的宽度比例
no setter
- screenHeight → double
-
当前设备高度
no setter
- screenWidth → double
-
当前设备宽度
no setter
- statusBarHeight → double
-
状态栏高度
no setter
- textScaleFactor → double
-
每个逻辑像素的字体像素数,字体的缩放比例
no setter
- uiSize ↔ Size
-
UI设计中手机尺寸 , dp
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
radius(
num r) → double - 根据宽度或高度中的较小值进行适配
-
setHeight(
num height) → double - 根据UI设计的设备高度适配
-
setSp(
num fontSize) → double - 字体大小适配方法
-
setWidth(
num width) → double - 根据UI设计的设备宽度适配
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
init(
BuildContext context, {Size designSize = defaultSize}) → void
Constants
- defaultSize → const Size
- 默认设计稿尺寸