ResizeUtil class

Constructors

ResizeUtil()

Properties

deviceType DeviceType
Gives the current device type ResizeUtil.deviceType
no setter
hashCode int
The hash code for this object.
no setterinherited
orientation Orientation
Gives the current orientation of the device
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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 ResizeUtil.scalarPixel
no setter

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 ResizeUtil
maxViewPort(num input) double
Return maximum value between ResizeUtil.viewWidth and ResizeUtil.viewHeight
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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
scalarPixel(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
toString() String
A string representation of this object.
inherited
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

Operators

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

Static Properties

allowtextScaling bool
Boolean to indicate text scaling
getter/setter pair
ui Size
Size of the device
getter/setter pair

Constants

defaultSize → const Size
Default size for device