Skip to content

Luckey-Elijah/auto_expanding_navigation_rail

Repository files navigation

auto_expanding_navigation_rail

An example project of how to add an "auto expanding" navigation rail.

tldr;

Wrap a NavigationRail in a MouseRegion:

MouseRegion(
  onEnter: (_) => setState(() => expanded = true),
  onExit: (_) => setState(() => expanded = false),
  child: NavigationRail(
    destinations: [ ... ],
    selectedIndex: index,
    extended: expanded,
    onDestinationSelected: (i) => setState(() => index = i),
  ),
)

About

An example project of how to add an "auto expanding" navigation rail.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published