ResponsiveScreenUtil class Null safety

Constructors

ResponsiveScreenUtil()
factory

Properties

allowFontScaling bool
allowFontScaling Specifies whether fonts should scale to respect Text Size accessibility settings. The default is false.
read / write
bottomBarHeight double
The offset from the bottom, in dp
read-only
hashCode int
The hash code for this object.
read-onlyinherited
pixelRatio double
The size of the media in logical pixels (e.g, the size of the screen).
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
scaleHeight double
The ratio of actual height to UI design
read-only
scaleText double
read-only
scaleWidth double
The ratio of actual width to UI design
read-only
screenHeight double
The vertical extent of this size. dp
read-only
screenWidth double
当前设备宽度 dp The horizontal extent of this size.
read-only
statusBarHeight double
The offset from the top, in dp
read-only
textScaleFactor double
The number of font pixels for each logical pixel.
read-only
uiSize Size
Size of the phone in UI Design , dp
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
radius(num r) double
Adapt according to the smaller of width or height
setHeight(num height) double
Highly adaptable to the device according to UI Design It is recommended to use this method to achieve a high degree of adaptation when it is found that one screen in the UI design does not match the current style effect, or if there is a difference in shape.
setSp(num fontSize, {bool? allowFontScalingSelf}) double
Font size adaptation method
setWidth(num width) double
Adapted to the device width of the UI Design. Height can also be adapted according to this to ensure no deformation , if you want a square
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

init(BoxConstraints constraints, {Size designSize = defaultSize, bool allowFontScaling = false}) → void

Constants

defaultSize → const Size
Size(360, 690)