SliverSize class
Subclass of Size that is also aware of its main and cross axis extent.
- Inheritance
-
- Object
- OffsetBase
- Size
- SliverSize
- Available extensions
Constructors
- SliverSize(double width, double height, Axis axis)
-
Creates a size with a width, height, and axis.
const
- SliverSize.axis(double cross, double main, Axis axis)
-
Creates a size with cross and main extents.
const
Properties
- aspectRatio → double
-
The aspect ratio of this size.
no setterinherited
- axis → Axis
-
The axis of this size.
final
- cross → double
-
The cross axis extent of this size.
no setter
- flipped → Size
-
A Size with the width and height swapped.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The vertical extent of this size.
no setterinherited
- isEmpty → bool
-
Whether this size encloses a non-zero area.
no setterinherited
- isFinite → bool
-
Whether both components are finite (neither infinite nor NaN).
no setterinherited
- isInfinite → bool
-
Returns true if either component is double.infinity, and false if both
are finite (or negative infinity, or NaN).
no setterinherited
- longestSide → double
-
The greater of the magnitudes of the width and the height.
no setterinherited
- main → double
-
The main axis extent of this size.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortestSide → double
-
The lesser of the magnitudes of the width and the height.
no setterinherited
- width → double
-
The horizontal extent of this size.
no setterinherited
Methods
-
axisSize(
Axis axis) → double -
Available on Size, provided by the SizeAxisUtil extension
Gets the extent of this size on the given axis. -
bottomCenter(
Offset origin) → Offset -
The offset to the center of the bottom edge of the rectangle described by
the given offset (which is interpreted as the top-left corner) and this
size.
inherited
-
bottomLeft(
Offset origin) → Offset -
The offset to the intersection of the bottom and left edges of the
rectangle described by the given offset (which is interpreted as the
top-left corner) and this size.
inherited
-
bottomRight(
Offset origin) → Offset -
The offset to the intersection of the bottom and right edges of the
rectangle described by the given offset (which is interpreted as the
top-left corner) and this size.
inherited
-
center(
Offset origin) → Offset -
The offset to the point halfway between the left and right and the top and
bottom edges of the rectangle described by the given offset (which is
interpreted as the top-left corner) and this size.
inherited
-
centerLeft(
Offset origin) → Offset -
The offset to the center of the left edge of the rectangle described by the
given offset (which is interpreted as the top-left corner) and this size.
inherited
-
centerRight(
Offset origin) → Offset -
The offset to the center of the right edge of the rectangle described by the
given offset (which is interpreted as the top-left corner) and this size.
inherited
-
contains(
Offset offset) → bool -
Whether the point specified by the given offset (which is assumed to be
relative to the top left of the size) lies between the left and right and
the top and bottom edges of a rectangle of this size.
inherited
-
crossAxisSize(
Axis axis) → double -
Available on Size, provided by the SizeAxisUtil extension
Gets the extent of this size crossing the given axis. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rotateWithAxis(
Axis axis) → Size -
Available on Size, provided by the SizeAxisUtil extension
Rotates this size withaxis
wherewidth
becomes the cross axis extent andheight
becomes the main axis extent. -
rotateWithCrossAxis(
Axis crossAxis) → Size -
Available on Size, provided by the SizeAxisUtil extension
Rotates this size withcrossAxis
wherewidth
becomes the cross axis extent andheight
becomes the main axis extent. -
topCenter(
Offset origin) → Offset -
The offset to the center of the top edge of the rectangle described by the
given offset (which is interpreted as the top-left corner) and this size.
inherited
-
topLeft(
Offset origin) → Offset -
The offset to the intersection of the top and left edges of the rectangle
described by the given Offset (which is interpreted as the top-left corner)
and this Size.
inherited
-
topRight(
Offset origin) → Offset -
The offset to the intersection of the top and right edges of the rectangle
described by the given offset (which is interpreted as the top-left corner)
and this size.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator %(
double operand) → Size -
Modulo (remainder) operator.
inherited
-
operator *(
double operand) → Size -
Multiplication operator.
inherited
-
operator +(
Offset other) → Size -
Binary addition operator for adding an Offset to a Size.
inherited
-
operator -(
OffsetBase other) → OffsetBase -
Binary subtraction operator for Size.
inherited
-
operator /(
double operand) → Size -
Division operator.
inherited
-
operator <(
OffsetBase other) → bool -
Less-than operator. Compares an Offset or Size to another Offset or
Size, and returns true if both the horizontal and vertical values of the
left-hand-side operand are smaller than the horizontal and vertical values
of the right-hand-side operand respectively. Returns false otherwise.
inherited
-
operator <=(
OffsetBase other) → bool -
Less-than-or-equal-to operator. Compares an Offset or Size to another
Offset or Size, and returns true if both the horizontal and vertical
values of the left-hand-side operand are smaller than or equal to the
horizontal and vertical values of the right-hand-side operand
respectively. Returns false otherwise.
inherited
-
operator ==(
Object other) → bool -
Compares two Sizes for equality.
inherited
-
operator >(
OffsetBase other) → bool -
Greater-than operator. Compares an Offset or Size to another Offset
or Size, and returns true if both the horizontal and vertical values of
the left-hand-side operand are bigger than the horizontal and vertical
values of the right-hand-side operand respectively. Returns false
otherwise.
inherited
-
operator >=(
OffsetBase other) → bool -
Greater-than-or-equal-to operator. Compares an Offset or Size to
another Offset or Size, and returns true if both the horizontal and
vertical values of the left-hand-side operand are bigger than or equal to
the horizontal and vertical values of the right-hand-side operand
respectively. Returns false otherwise.
inherited
-
operator ~/(
double operand) → Size -
Integer (truncating) division operator.
inherited
Constants
- zero → const SliverSize
- An empty size, one with a zero width and a zero height.