ResponsiveUtils class
This class is a middleware to save the responsive information,
it is usefull when you have to do a lot of callings in the same file.
It has the same behaviour as the BuildContext
extension
/// ```dart final mResponsive = ResponsiveUtils.of(context);
mResponsive.isLandscape; mResponsive.widthPct(10); mResponsive.heightPx; ...
Constructors
- ResponsiveUtils.of(BuildContext _context)
Properties
- diagonalInches → double
-
Returns screen diagonal in Inches
no setter
- diagonalPx → double
-
Returns diagonal screen pixels
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- heightInches → double
-
Returns screen height in Inches
no setter
- heightPx → double
-
Returns same as MediaQuery.of(context).height
no setter
- isLandscape → bool
-
Returns if Orientation is landscape
no setter
- mq → MediaQueryData
-
Returns same as MediaQuery.of(context)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sizeInches → Size
-
Returns pixel size in Inches
no setter
- sizePx → Size
-
Returns same as MediaQuery.of(context).size
no setter
- textTheme → TextTheme
-
Extension for getting textTheme
no setter
- theme → ThemeData
-
Extension for getting Theme
no setter
- widthInches → double
-
Returns screen width in Inches
no setter
- widthPx → double
-
Returns same as MediaQuery.of(context).size.width
no setter
Methods
-
heightPct(
double percent) → double - Returns percent (1-100) of screen height in pixels
-
inchesPct(
double percent) → double - Returns percent (1-100) of screen inches
-
isDesktop(
) → bool -
isMobile(
) → bool -
isTablet(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
widthPct(
double percent) → double - Returns percent (1-100) of screen width in pixels
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited