DecorationImageToo class
An image to show in a BoxDecoration which supports the Repeat rendering modes including Repeat.mirror.
The image is painted using paintImageToo, which describes the meanings of the various fields on this class in more detail.
- Implemented types
- Implementers
- Annotations
Constructors
-
DecorationImageToo({required ImageProvider<
Object> image, ImageErrorListener? onError, BoxFit? fit, double scale = 1.0, AlignmentGeometry alignment = Alignment.center, Repeat repeatMode = Repeat.noRepeat, Offset mirrorOffset = Offset.zero, ColorFilter? colorFilter, Rect? centerSlice, bool matchTextDirection = false}) -
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.
final
- centerSlice → Rect?
-
The center slice for a nine-patch image.
final
- colorFilter → ColorFilter?
-
A color filter to apply to the image before painting it.
final
- filterQuality → FilterQuality
-
Used to set the filterQuality of the image.
finalinherited
- fit → BoxFit?
-
How the image should be inscribed into the box.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
image
→ ImageProvider<
Object> -
The image to be painted into the decoration.
final
- 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.
final
- mirrorOffset → Offset
-
Only applicable if repeat is Repeat.mirror, Repeat.mirrorX, or
Repeat.mirrorY. Default is Offset.zero.
final
- onError → ImageErrorListener?
-
An optional error callback for errors emitted when loading image.
final
- 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 setteroverride
- repeatMode → Repeat
-
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
-
createPainter(
VoidCallback onChanged) → DecorationImagePainter -
Creates a DecorationImagePainterToo for this DecorationImageToo.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override