ScaleSize class
A class to help you scale your design on bigger or smaller screens to achieve the same design look.
Constructors
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 Properties
-
Get navigation bar height
getter/setter pair
- screenHeight ↔ double
-
Get screen height
getter/setter pair
- screenWidth ↔ double
-
Get screen width
getter/setter pair
- statusBarHeight ↔ double
-
Get status bar height
getter/setter pair
Static Methods
-
init(
BuildContext context, {double designWidth = 0, double designHeight = 0}) → void -
Setup the screen with a
context
and thedesignWidth
(and thedesignHeight
) you will use. So, if you have a design width = 360, height = 640. You will pass first the context then the designWidth (and designHeight). init(context, designWidth = 360, designHeight = 640) -
reInit(
BuildContext context, {double designWidth = 0, double designHeight = 0, Orientation orientation = Orientation.portrait}) → void -
Setup the screen with a
context
and thedesignWidth
(and thedesignHeight
) you will use. So, you want reinit _designHeight , _designHeight when rotate screen -
scaleH(
double size, {double designHeight = 0}) → double -
Get the number scaled horizontally.
If you want change current designWidth, you will pass
size
anddesignHeight
. scaleH(size, designHeight = 360) -
scaleW(
double size, {double designWidth = 0}) → double -
Get the number scaled vertically.
If you want change current designWidth, you will pass
size
anddesignWidth
. scaleW(size, designWidth = 360)