AsyncImage

Displays an image from a local file or remote URL.

Properties

NameTypeDefaultDescription
srcStringThe URL of the image. Example: ‚https://example.com/image.jpg‘.
weightInt0Determines how much space the image takes relative to other elements in the same layout. Use 0 for no weight-based resizing.
widthInt0Fixed width of the image in dp. Use 0 for automatic sizing.
heightInt0Fixed height of the image in dp. Use 0 for automatic sizing.
scaleStringDefines how the image should be scaled within its bounds. Options include: ‚Fit‘, ‚Fill‘, ‚Crop‘, ‚Inside‘.
alignmentStringCenterHow the image is aligned inside its layout container. Options: Start, Center, End, Top, Bottom.

Allowed Roots

← Back to Element Reference