ViewPorts class
Collection of the most regular ViewPort compositions.
Refer to the "test/viewports_test.dart" for examples.
See also:
- ViewPort - abstraction that describes a rendering area size
- ViewPortWidget - InheritedWidget that holds a ViewPort configuration
- Annotations
Constructors
- ViewPorts()
-
const
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
-
coerced(
ViewPort decorated, {double minHeight = 0, double minWidth = 0, double maxHeight = double.infinity, double maxWidth = double.infinity}) → ViewPort -
Provides a ViewPort which ViewPort.width and ViewPort.height values
will be lower bounded by the provided
minWidth
andminHeight
and upper bounded bymaxWidth
andmaxHeight
. -
coercedMediaQuery(
MediaQueryData data, {double minHeight = 0, double minWidth = 0, double maxHeight = double.infinity, double maxWidth = double.infinity}) → ViewPort -
Provides a ViewPort which will produce the
data
's size values that are lower bounded by the givenminHeight
andminWidth
and upper bounded by the givenmaxHeight
andmaxWidth
-
fixed(
{double height = double.infinity, double width = double.infinity}) → ViewPort -
Provides a ViewPort which holds the given
height
andwidth
statically. Arguments are set to double.infinity by default. -
fromMediaQueryData(
MediaQueryData data) → ViewPort - Provides a ViewPort that adapts the MediaQueryData.size interface
-
lowerBounded(
ViewPort decorated, {double height = 0, double width = 0}) → ViewPort - Provides a ViewPort which ViewPort.width and ViewPort.height values will be lower bounded by the given ones.
-
lowerBoundedMediaQuery(
MediaQueryData data, {double height = 0, double width = 0}) → ViewPort -
Provides a ViewPort which will produce the
data
's size values that are lower bounded by the givenheight
andwidth
-
maxOf(
ViewPort left, ViewPort right) → ViewPort - Provides a ViewPort which chooses the maximal ViewPort.height and ViewPort.width value out of the two ViewPort implementations given
-
minOf(
ViewPort left, ViewPort right) → ViewPort - Provides a ViewPort which chooses the minimal ViewPort.height and ViewPort.width value out of the two ViewPort implementations given
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
upperBounded(
ViewPort decorated, {double height = double.infinity, double width = double.infinity}) → ViewPort - Provides a ViewPort which ViewPort.width and ViewPort.height values will be upper bounded by the given ones.
-
upperBoundedMediaQuery(
MediaQueryData data, {double height = double.infinity, double width = double.infinity}) → ViewPort -
Provides a ViewPort which will produce the
data
's size values that are upper bounded by the givenheight
andwidth
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited