DecorationImage class
An image for a box decoration.
The image is painted using paintImage
, which describes the meanings of the
various fields on this class in more detail.
- Annotations
-
- @immutable
Constructors
- DecorationImage.new({required ImageProvider image, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, Rect? centerSlice, ImageRepeat repeat = ImageRepeat.noRepeat, bool matchTextDirection = false, double scale = 1.0, double opacity = 1.0, FilterQuality filterQuality = FilterQuality.low, bool invertColors = false, bool isAntiAlias = false})
-
Creates an image to show in a BoxDecoration.
const
Properties
- alignment → AlignmentGeometry
-
How to align the image within its bounds.
final
- centerSlice → Rect?
-
The center slice for a nine-patch image.
final
- filterQuality → FilterQuality
-
Used to set the filterQuality of the image.
final
- fit → BoxFit?
-
How the image should be inscribed into the box.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → ImageProvider
-
The image to be painted into the decoration.
final
- invertColors → bool
-
Whether the colors of the image are inverted when drawn.
final
- isAntiAlias → bool
-
Whether to paint the image with anti-aliasing.
final
- matchTextDirection → bool
-
Whether to paint the image in the direction of the TextDirection.
final
- opacity → double
-
If non-null, the value is multiplied with the opacity of each image
pixel before painting onto the canvas.
final
- repeat → ImageRepeat
-
How to paint any portions of the box that would not otherwise be covered
by the image.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double
-
Defines image pixels to be shown per logical pixels.
final
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