Widgets

Image

Image

Render local, remote, or generated images.

Example

image(
  "https://picsum.photos/320/180",
  width: 320,
  height: 180
)

Common properties

  • positional source
  • src
  • width
  • height
  • fit
  • border_radius
  • placeholder_src

Usage

image(
  "assets/icon.png",
  width: 96,
  height: 96
)

Notes

  • Use local assets for app icons and packaged images

Complete API

Helpers

  • image(src = ..., **props)

Accepted properties

  • anti_alias — Sets the anti alias property.
  • border_radius — Corner radius.
  • cache_height — Cache height.
  • cache_width — Cache width.
  • color — Foreground color.
  • color_blend_mode — Sets the color blend mode property.
  • data — Arbitrary value you can attach to the control and read back in handlers.
  • error_content — Sets the error content property.
  • exclude_from_semantics — Sets the exclude from semantics property.
  • fade_in_animation — Sets the fade in animation property.
  • filter_quality — Sets the filter quality property.
  • fit — Sets the fit property.
  • gapless_playback — Sets the gapless playback property.
  • height — Fixed height in logical pixels.
  • key — Stable identity used to preserve state across rebuilds.
  • paint — Sets the paint property.
  • placeholder_fade_out_animation — Sets the placeholder fade out animation property.
  • placeholder_fit — Sets the placeholder fit property.
  • placeholder_src — Sets the placeholder src property.
  • repeat — Sets the repeat property.
  • semantics_label — Sets the semantics label property.
  • src — Source URL or asset path of the image.
  • src_base64 — Sets the src base64 property.
  • width — Fixed width in logical pixels.
  • x — Sets the x property.
  • y — Sets the y property.

Wire reference

  • Family: shared
  • Widget type: image