StaticRelativeBuilder class
A static helper class for responsive scaling without building a widget.
Provides the current screen size and scaling functions sy and sx.
Constructors
- StaticRelativeBuilder(BuildContext context)
-
Creates a StaticRelativeBuilder with the given
context.
Properties
- context → BuildContext
-
The BuildContext used to access MediaQuery if needed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size
-
Returns the logical screen size using View.of(context).
no setter
- windowHeight → double
-
Returns the current window height.
no setter
- windowWidth → double
-
Returns the current window width.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sx(
num value) → double - Scales a horizontal value relative to the screen width.
-
sy(
num value) → double - Scales a vertical value relative to the screen height.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited