Reference

Banner

Banner

Banner control. Build it with the banner helper.

Example

banner(
  content: text("Banner"),
  leading: icon("menu"),
  bgcolor: :surface_container_high,
  open: true,
  on_dismiss: ->(event) {}
)

Properties

  • actions — Controls shown in the trailing action area.
  • adaptive — Adapts to the platform (Material/Cupertino) when true.
  • bgcolor — Background color.
  • content — The single child control rendered inside this control.
  • content_padding — Content padding.
  • content_text_style — Content text style.
  • divider_color — Divider color.
  • elevation — Shadow depth (z-height).
  • force_actions_below
  • leading — Control placed before the main content (e.g. an icon or avatar).
  • leading_padding — Leading padding.
  • min_action_bar_height — Min action bar height.
  • open — Whether the control (dialog/sheet/menu) is open.
  • shadow_color — Color of the drop shadow.
  • surface_tint_color — Surface tint color.

Plus the common layout and animation properties shared by most controls (expand, visible, disabled, opacity, width, height, align, tooltip, animate_*, …).

Events

  • on_dismiss — Fired when the control is dismissed.
  • on_visible — Fired when the control becomes visible.

Reference

  • Family: materials
  • Widget type: banner
  • Helper: banner