Scale class
Scale 类用于管理屏幕尺寸和布局比例,以便在应用程序中创建响应式布局
Constructors
- Scale()
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
-
init(
BuildContext context, double standardWidth, double standardHeight) → void - 通过传递 BuildContext 参数来初始化 Scale
-
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
- defaultSize ↔ double
-
默认尺寸,通常用于字体大小和间距的比例计算
getter/setter pair
- orientation ↔ Orientation
-
当前屏幕的方向,可以是横向(landscape)或纵向(portrait)
getter/setter pair
- screenHeight ↔ double
-
屏幕的高度,以逻辑像素为单位
getter/setter pair
- screenWidth ↔ double
-
屏幕的宽度,以逻辑像素为单位
getter/setter pair
- standardHeight ↔ double
-
标准高度看设计师的习惯
getter/setter pair
- standardWidth ↔ double
-
标准宽度看设计师的习惯
getter/setter pair