Reference

NavigationRail

NavigationRail

NavigationRail control. Build it with the navigation_rail helper.

Example

navigation_rail(
  leading: icon("menu"),
  trailing: icon("chevron_right"),
  bgcolor: :surface_container_high,
  expand: true,
  on_change: ->(event) {}
)

Properties

  • bgcolor — Background color.
  • destinations — The navigation destinations.
  • elevation — Shadow depth (z-height).
  • extended
  • group_alignment — Group alignment.
  • indicator_color — Indicator color.
  • indicator_shape
  • label_type
  • leading — Control placed before the main content (e.g. an icon or avatar).
  • min_extended_width — Min extended width.
  • min_width — Min width.
  • selected_index
  • selected_label_text_style — Selected label text style.
  • trailing — Control placed after the main content.
  • unselected_label_text_style — Unselected label text style.
  • use_indicator

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

Events

  • on_animation_end — Fired when an animation completes.
  • on_change — Fired when the value changes.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: materials
  • Widget type: navigationrail
  • Helper: navigation_rail