Scale class
A class to help you scale your design on bigger or smaller screens to achieve the same design look.
Constructors
- Scale()
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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
Static Methods
-
scaleFont(
num number) → num - Get the font scaled vertically.
-
scaleHorizontally(
num number) → num - Get the number scaled horizontally.
-
scaleVertically(
num number) → num - Get the number scaled vertically.
-
setup(
BuildContext context, Size screenSize) → void -
Setup the screen with a
context
and the size you will use. So, if you have a design with 1280 * 720. You will pass first the context then the design size. setup(context, Size(1280, 720)) -
setupWith(
Size deviceScreenSize, Size screenSize) → void - Setup the screen with the device screen Size and the size you will use. So, if you have a design with 1280 * 720. You will pass first the device screen size then the design size. setup(deviceScreenSize, Size(1280, 720))