Sizer class
Provides information about the screen that can be used to your liking An instance can be created via a builder in MaterialApp so you can use it globally and have the screen information wherever you want.
Constructors
- Sizer()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
aspectRatio(
BuildContext context) → double - It tells you the exact value of the aspectRatio of the screen
-
devicePixelRatio(
BuildContext context) → double -
It tells you the exact value of the
devicePixelratioof the screen -
h(
BuildContext context) → double -
It tells you the exact value of the
heightof the screen -
isDesktop(
BuildContext context) → bool - It tells you if the screen is desktop so you don't have to put the condition
-
isLandscape(
BuildContext context) → bool -
It tells you if the orientation of the screen is in portrait mode so
you don't have to put the condition
(orientation(context) == Orientation.landscape) ? true : false -
isMobile(
BuildContext context) → bool - It tells you if the screen is mobile so you don't have to put the condition
-
isPortrait(
BuildContext context) → bool -
It tells you if the orientation of the screen is in portrait mode so
you don't have to put the condition
(orientation(context) == Orientation.portrait) ? true : false -
isTablet(
BuildContext context) → bool - It tells you if the screen is tablet so you don't have to put the condition
-
orientation(
BuildContext context) → Orientation - Tells you the current orientation of the device
-
screenSize(
BuildContext context) → ScreenSize - Returns the size of the screen according to the type of device, as specified in ScreenSize
-
w(
BuildContext context) → double -
It tells you the exact value of the
widthof the screen