DecorationImage
An image for a box decoration.
Properties
-
alignment
(Alignment
) –The alignment of the image within its bounds.
-
anti_alias
(bool
) –Whether to paint the image in anti-aliased quality.
-
color_filter
(ColorFilter | None
) –A color filter to apply to the image before painting it.
-
filter_quality
(FilterQuality
) –The quality of the image filter.
-
fit
(BoxFit | None
) –How the image should be inscribed into the box.
-
invert_colors
(bool
) –Whether to invert the colors of the image while drawing.
-
match_text_direction
(bool
) –Whether to paint the image in the direction of the TextDirection.
-
opacity
(Number
) –The opacity of the image.
-
repeat
(ImageRepeat
) –How the image should be repeated to fill the box.
-
scale
(Number
) –The scale(image pixels to be shown per logical pixels) to apply to the image.
-
src
(str | None
) –The image to paint.
-
src_base64
(str | None
) –The base64-encoded image to paint.
-
src_bytes
(bytes | None
) –TBD
Methods
-
copy
–Returns a copy of this object with the specified properties overridden.
Properties#
alignment
#
The alignment of the image within its bounds.
color_filter
#
color_filter: ColorFilter | None = None
A color filter to apply to the image before painting it.
invert_colors
#
invert_colors: bool = False
Whether to invert the colors of the image while drawing.
match_text_direction
#
match_text_direction: bool = False
Whether to paint the image in the direction of the TextDirection.
scale
#
scale: Number = 1.0
The scale(image pixels to be shown per logical pixels) to apply to the image.
Methods#
copy
#
copy(
*,
src: str | None = None,
src_base64: str | None = None,
src_bytes: bytes | None = None,
color_filter: ColorFilter | None = None,
fit: BoxFit | None = None,
alignment: Alignment | None = None,
repeat: ImageRepeat | None = None,
match_text_direction: bool | None = None,
scale: Number | None = None,
opacity: Number | None = None,
filter_quality: FilterQuality | None = None,
invert_colors: bool | None = None,
anti_alias: bool | None = None,
) -> DecorationImage
Returns a copy of this object with the specified properties overridden.