ScreenCalculator class

Calculates the size, orientation and aspect ratio of a screen.

Constructors

ScreenCalculator(double maxWidth, double maxHeight, {LayoutBreakpoints? breakpoints})
ScreenCalculator.fromSize(Size size, {LayoutBreakpoints? breakpoints})
Convenience: builds a calculator from a Size.

Properties

breakpoints → LayoutBreakpoints
Breakpoints used by isAspectRatioMobile. Defaults to LayoutBreakpoints.global at the time the calculator was constructed.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
The height of the screen.
no setter
isAspectRatioMobile → bool
Whether the aspect ratio of the screen is that of a mobile phone, using breakpoints.minMobileAspectRatio as the threshold.
no setter
isHorizontal → bool
Whether the screen is horizontal.
no setter
isNeitherHorizontalNorVertical → bool
Whether the screen is neither horizontal nor vertical, i.e. a square.
no setter
isVertical → bool
Whether the screen is vertical.
no setter
longest → double
The longest side of the screen.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shortest → double
The shortest side of the screen.
no setter
size → ScreenSize
The size of the screen.
no setter
sizeHorizontalBias → ScreenSize
The size of the screen with the shortest side as the width.
no setter
sizeVerticalBias → ScreenSize
The size of the screen with the longest side as the width.
no setter
width → double
The width of the screen.
no setter

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