BoxFit enum Null safety
How a box should be inscribed into another box.
See also:
- applyBoxFit, which applies the sizing semantics of these values (though not the alignment semantics).
Constructors
- BoxFit()
-
const
Values
- fill → const BoxFit
-
Fill the target box by distorting the source's aspect ratio.
BoxFit()
- contain → const BoxFit
-
As large as possible while still containing the source entirely within the target box.
BoxFit()
- cover → const BoxFit
-
As small as possible while still covering the entire target box.
To actually clip the content, use
clipBehavior: Clip.hardEdge
alongside this in a FittedBox.BoxFit()
- fitWidth → const BoxFit
-
Make sure the full width of the source is shown, regardless of whether this means the source overflows the target box vertically.
To actually clip the content, use
clipBehavior: Clip.hardEdge
alongside this in a FittedBox.BoxFit()
- fitHeight → const BoxFit
-
Make sure the full height of the source is shown, regardless of whether this means the source overflows the target box horizontally.
To actually clip the content, use
clipBehavior: Clip.hardEdge
alongside this in a FittedBox.BoxFit()
- none → const BoxFit
-
Align the source within the target box (by default, centering) and discard any portions of the source that lie outside the box.
The source image is not resized.
To actually clip the content, use
clipBehavior: Clip.hardEdge
alongside this in a FittedBox.BoxFit()
- scaleDown → const BoxFit
-
Align the source within the target box (by default, centering) and, if necessary, scale the source down to ensure that the source fits within the box.
This is the same as
contain
if that would shrink the image, otherwise it is the same asnone
.BoxFit()
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited