ScaledSizeUtil class


hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.


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

Static Properties

deviceType DeviceType
Gives the current device type ScaledSizeUtil.deviceType
no setter
orientation Orientation
Gives the current orientation of the device
no setter
scale double
Gives the scale factor for the device
no setter
scaleH double
Gives the scale height for the device
no setter
scaleW double
Gives the scale width for the device
no setter
screenHeight double
Gives the screen height of the device
no setter
screenWidth double
Gives the screen width of the device
no setter
textScaleFactor double
Returns text scaling factor which will be later used for font size in ScaledSizeUtil.scaledFontSize
no setter

Static Methods

height(num input) double
Gives the responsive height
init(BoxConstraints constraints, Orientation orientation, {double base = 16.0, Size size = defaultSize, bool allowTextScaling = true}) → void
Initializing ScaledSizeUtil
maxViewPort(num input) double
Return maximum value between ScaledSizeUtil.viewWidth and ScaledSizeUtil.viewHeight
radius(num input) double
Return the radius for rounded corners
rem(num input) double
Returns font size in rem based on the input and base size
scaledFontSize(num input) double
Gives the font size in scalarPixels based on the input If _allowTextScaling is set true it will returns a scalable font size If _allowTextScaling is set false it will returns a non scalable font size
viewHeight(num input) double
caculates the view height for the given input
viewWidth(num input) double
calculates the view width for the given input
width(num input) double
Gives the responsive width


defaultSize → const Size
Default size for device