WindowSize class

Responsive layout helpers using LayoutBuilder constraints.

Constructors

WindowSize()

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

isNarrowWindow(BoxConstraints constraints) bool
Legacy method — equivalent to isVeryNarrow.
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

isMedium(BoxConstraints constraints, {double narrowThreshold = NavigationConstants.narrowScreenThreshold, double wideThreshold = NavigationConstants.wideScreenThreshold}) bool
Whether constraints width falls in the medium range, i.e. between narrowThreshold (inclusive) and wideThreshold (exclusive).
isNarrow(BoxConstraints constraints, {double veryNarrowThreshold = NavigationConstants.veryNarrowScreenThreshold, double narrowThreshold = NavigationConstants.narrowScreenThreshold}) bool
Whether constraints width falls in the narrow range, i.e. between veryNarrowThreshold (inclusive) and narrowThreshold (exclusive).
isVeryNarrow(BoxConstraints constraints, {double threshold = NavigationConstants.veryNarrowScreenThreshold}) bool
Whether constraints width is below the very narrow threshold.
isVeryWide(BoxConstraints constraints, {double threshold = NavigationConstants.veryWideScreenThreshold}) bool
Whether constraints width exceeds the very wide threshold.
isWide(BoxConstraints constraints, {double wideThreshold = NavigationConstants.wideScreenThreshold, double veryWideThreshold = NavigationConstants.veryWideScreenThreshold}) bool
Whether constraints width falls in the wide range, i.e. between wideThreshold (inclusive) and veryWideThreshold (exclusive).

Constants

smallHeightLimit → const double
Small height threshold.
smallWidthLimit → const double
Small width threshold.