WidgetImage¶
Image element shown in widget.
An image shown in a widget. You do not create instances of this element directly. Instead you should call addImage()
on an instance of a ListWidget
.
image¶
Image to show in widget.
image: Image
resizable¶
Whether the image is resizable.
When set to true, the image can be resized. Defaults to true.
resizable: bool
imageSize¶
Size of the image in the widget.
Size of the image. When set to null, the image will be shwon at its full size. Defaults to null.
imageSize: Size
imageOpacity¶
Opacity when shown in widget.
Opacity of the image. This must be a value between 0 and 1. Defaults to 1.
imageOpacity: number
cornerRadius¶
Radius of the corners.
Radius of the rounded corners. This property is ignored when containerRelativeShape
is set to true. Defaults to 0.
cornerRadius: number
borderWidth¶
Border width.
Width of the border around the image. Defaults to 0.
borderWidth: number
borderColor¶
Border color.
Color of the border around the image. Defaults to black.
borderColor: Color
containerRelativeShape¶
Shape the image relative to its container.
When true the corners of the image will be rounded relative to the containing widget. The value of cornerRadius
is ignored when this is true. Defaults to false.
containerRelativeShape: bool
tintColor¶
Tint color of the image.
Changes the color of the image. Set to null
to show the original image. Defaults to null
.
tintColor: Color
url¶
URL to open.
The URL will be opened when the text is tapped. This is only supported in medium and large widgets. Small widgets can only have a single tap target, which is specified by the url
on the widget.
url: string
-leftAlignImage¶
Left aligns the image.
leftAlignImage()
Specifies that image should be left aligned. This is the default.
-centerAlignImage¶
Center aligns the image.
centerAlignImage()
Specifies that image should be center aligned.
-rightAlignImage¶
Right aligns the image.
rightAlignImage()
Specifies that image should be right aligned.
-applyFittingContentMode¶
Uses fitting content mode.
applyFittingContentMode()
The image will fit the available space. This content mode is the default.
-applyFillingContentMode¶
Uses filling content mode.
applyFillingContentMode()
The image will fill the available space.