Widgets

TileLayer

TileLayer

TileLayer control. Build it with the tile_layer helper.

Example

tile_layer(
  expand: true,
  width: 240,
  height: 120,
  on_animation_end: ->(event) {}
)

Properties

  • additional_options — Sets the additional options property.
  • display_mode — Sets the display mode property.
  • enable_retina_mode — Sets the enable retina mode property.
  • enable_tms — Sets the enable tms property.
  • errorImageSrc — Sets the errorImageSrc property.
  • evict_error_tile_strategy — Sets the evict error tile strategy property.
  • fallback_url — Sets the fallback url property.
  • keep_buffer — Sets the keep buffer property.
  • max_native_zoom — Sets the max native zoom property.
  • max_zoom — Sets the max zoom property.
  • min_native_zoom — Sets the min native zoom property.
  • min_zoom — Sets the min zoom property.
  • pan_buffer — Sets the pan buffer property.
  • subdomains — Sets the subdomains property.
  • tile_bounds — Sets the tile bounds property.
  • tile_size — Sets the tile size property.
  • url_template — Sets the url template property.
  • user_agent_package_name — Sets the user agent package name property.
  • zoom_offset — Sets the zoom offset property.
  • zoom_reverse — Sets the zoom reverse property.

Common layout and animation properties

  • align — Alignment of the control within its parent.
  • animate_align — Animates alignment changes.
  • animate_margin — Animates margin changes.
  • animate_offset — Animates offset changes.
  • animate_opacity — Animates opacity changes.
  • animate_position — Animates position changes.
  • animate_rotation — Animates rotation changes.
  • animate_scale — Animates scale changes.
  • animate_size — Animates size changes.
  • aspect_ratio — Width-to-height ratio to maintain.
  • badge — Badge drawn on the corner of the control.
  • bottom — Bottom offset when positioned inside a stack.
  • col — Responsive column span (1-12) per breakpoint.
  • data — Arbitrary value you can attach to the control and read back in handlers.
  • disabled — Disables interaction when true.
  • expand — Fills the available space along the parent's main axis when true.
  • expand_loose — Like expand, but only grows up to the child's natural size.
  • height — Fixed height in logical pixels.
  • key — Stable identity used to preserve state across rebuilds.
  • left — Left offset when positioned inside a stack.
  • margin — Outer spacing around the control.
  • offset — Translation offset applied to the control.
  • opacity — Opacity from 0.0 (transparent) to 1.0 (opaque).
  • right — Right offset when positioned inside a stack.
  • rotate — Rotation applied to the control.
  • rtl — Renders right-to-left when true.
  • scale — Scale transform applied to the control.
  • size_change_interval — Throttle interval for on_size_change, in ms.
  • tooltip — Text shown on hover/long-press.
  • top — Top offset when positioned inside a stack.
  • visible — Hides the control when false.
  • width — Fixed width in logical pixels.

Events

  • on_animation_end — Fired when an animation completes.
  • on_image_error — Fired when the image fails to load.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: materials
  • Widget type: tilelayer
  • Helpers: tile_layer, tilelayer