ResponseUI class
ResponseUI is the main brain of the package.
We are using it to calculate the geometric value of our widgets
in which we define for example a specific width
or height
in pixels
and in that case we want the specified property to be constant whatever the
device screen size would be.
For example:
if you want to specific a constant height
and width
to your container
lets say it will be 100 pixels in height and 100 pixels in width, you will
type the height
property = 100 and the width
property = 100, So in that
case you want to maintain these height
and width
property relative to
the device screen size you originally designed your app on.
in that case the class/package will do the work to change these relative
height
and width
to maintain the same display occupation size.
Properties
- bottomPadding → double
-
The padding offset from the bottom.
no setter
- currentContext → BuildContext?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- inMobilePortrait → bool
-
inMobilePortrait
is helpful if you want to know whether the device you are working on a Mobile Portrait or a Tablet Portrait mode and you can take action according to these information ot layout your UI.no setter - isDevicePortrait → bool
-
isDevicePortrait
is helpful if you want to know whether the device orientation is in Portrait or in Landscape, it can ably to any device (Tablet or Mobil Phone).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenHeight → double?
-
screenHeight
returns the current device screen height. Note: You can use it instead ofMediaQuery.of(context).size.height
no setter - screenPixelRatio → double
-
screenPixelRatio
is aMediaQuery
function. The number of device pixels for each logical pixel. This number might not be a power of two. Indeed, it might not even be an integer. For example, the Nexus 6 has a device pixel ratio of 3.5.no setter - screenWidth → double?
-
screenWidth
returns the current device screen width. Note: You can use it instead ofMediaQuery.of(context).size.width
no setter - textScaleFactor → double
-
The number of font pixels for each logical pixel.
no setter
- topPadding → double
-
The padding offset from the top.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setFontSize(
double fontSize) → double -
setFontSize
uses its argumentfontSize
to calculate the initial text size in pixels and from that the package can deal with all the calculation.setFontSize
{@tool sample} -
setHeight(
double height) → double -
setHeight
uses its argumentheight
to calculate the initial widget height in pixels and from that the package can deal with all the calculation.setHeight
{@tool sample} -
setWidth(
double width) → double -
setWidth
uses its argumentwidth
to calculate the initial widget width in pixels and from that the package can deal with all the calculation.setWidth
{@tool sample} -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → ResponseUI
-
no setter
Static Methods
-
init(
BoxConstraints constraints, Orientation orientation, double originalHeight, double originalWidth, BuildContext currentContext) → void