BetterScreenUtil class
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 Properties
- safeAreaBottomHeight → double
-
no setter
- safeAreaTopHeight → double
-
no setter
- screenHeight → double
-
no setter
- screenWidth → double
-
no setter
Static Methods
-
handleOnePixel(
double width) → double -
init(
{required BuildContext context, required double designWidth, required double designHeight, bool minTextAdapt = true, bool enableScaleWH = true}) → void - 初始化(必须在 MaterialApp 之后调用)
-
scaleFont(
double fontSize) → double - 字体大小适配(可配置是否基于最小值)
-
scaleHeight(
double height) → double - 基于高度的比例缩放
-
scaleRadius(
double size) → double - 基于更小边的比例缩放(避免拉伸)
-
scaleWidth(
double width) → double - 基于宽度的比例缩放