DecorationImg class

A shorthand wrapper for DecorationImageToo.

Inheritance

Constructors

DecorationImg({required ImageProvider<Object> image, double scale = 1.0, BoxFit? fit, AlignmentGeometry alignment = Alignment.center, Repeat repeatMode = Repeat.noRepeat, Offset mirrorOffset = Offset.zero, ColorFilter? colorFilter, Rect? centerSlice, bool matchTextDirection = false, ImageErrorListener? onError})
Creates an image to show in a BoxDecoration which supports the Repeat rendering modes including Repeat.mirror.
const

Properties

alignment AlignmentGeometry
How to align the image within its bounds.
finalinherited
centerSlice Rect?
The center slice for a nine-patch image.
finalinherited
colorFilter ColorFilter?
A color filter to apply to the image before painting it.
finalinherited
filterQuality FilterQuality
Used to set the filterQuality of the image.
finalinherited
fit BoxFit?
How the image should be inscribed into the box.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
image ImageProvider<Object>
The image to be painted into the decoration.
finalinherited
invertColors bool
Whether the colors of the image are inverted when drawn.
finalinherited
isAntiAlias bool
Whether to paint the image with anti-aliasing.
finalinherited
matchTextDirection bool
Whether to paint the image in the direction of the TextDirection.
finalinherited
mirrorOffset Offset
Only applicable if repeat is Repeat.mirror, Repeat.mirrorX, or Repeat.mirrorY. Default is Offset.zero.
finalinherited
onError ImageErrorListener?
An optional error callback for errors emitted when loading image.
finalinherited
opacity double
If non-null, the value is multiplied with the opacity of each image pixel before painting onto the canvas.
finalinherited
repeat ImageRepeat
How to paint any portions of the box that would not otherwise be covered by the image.
no setterinherited
repeatMode Repeat
How to paint any portions of the box that would not otherwise be covered by the image.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
Defines image pixels to be shown per logical pixels.
finalinherited

Methods

createPainter(VoidCallback onChanged) DecorationImagePainter
Creates a DecorationImagePainterToo for this DecorationImageToo.
inherited
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