Skip to main content

NavigationDrawerDestination

A NavigationDrawer destination.

Inherits: Control

Properties

  • bgcolor - The background color of the whole rectangular area behind this drawer destination.
  • icon - An icon name (or Control) that's displayed for this destination.
  • label - The label that appears alongside the icon of this destination.
  • selected_icon - An icon name (or Control) that's displayed for this destination when selected.

Properties

bgcolorclass-attributeinstance-attribute

bgcolor: Optional[ColorValue] = None

The background color of the whole rectangular area behind this drawer destination.

To customize only the indicator color consider using flet.NavigationDrawer.indicator_color.

If it is None, no background color is set for this destination and bgcolor will be visible.

iconinstance-attribute

An icon name (or Control) that's displayed for this destination.

If selected_icon is provided, icon will only be displayed when this destination is not selected.

The icon will use flet.NavigationDrawerTheme.icon_theme. If this is None, the default IconTheme would use a size of 24.0 and flet.ColorScheme.on_surface_variant.

labelinstance-attribute

label: StrOrControl

The label that appears alongside the icon of this destination.

selected_iconclass-attributeinstance-attribute

selected_icon: Optional[IconDataOrControl] = None

An icon name (or Control) that's displayed for this destination when selected.

If provided, this destination will fade from icon to selected_icon when this destination goes from unselected to selected state.

If not provided, icon will be displayed for both selected and unselected states.

The icon will use flet.NavigationDrawerTheme.icon_theme with flet.ControlState.SELECTED. If this is None, the default IconTheme would use a size of 24.0 and flet.ColorScheme.on_secondary_container.