⌂
›
Widgets
›
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— Sets the force actions below property.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.
Common layout and animation properties
badge— Badge drawn on the corner of the control.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.key— Stable identity used to preserve state across rebuilds.margin— Outer spacing around the control.opacity— Opacity from 0.0 (transparent) to 1.0 (opaque).rtl— Renders right-to-left when true.tooltip— Text shown on hover/long-press.visible— Hides the control when false.
Events
on_dismiss— Fired when the control is dismissed.on_visible— Fired when the control becomes visible.
Reference
- Family:
materials - Widget type:
banner - Helpers:
banner