adaptive_dashboard_shell library

An adaptive dashboard shell: a collapsible, shadcn-style sidebar rail on desktop and tablet that switches to a bottom navigation bar on mobile, wrapping your routed content.

See AppDashboardShell for the entry point, or compose AppSidebar and the Sidebar* widgets directly for custom chrome.

Classes

AppDashboardShell
Adaptive app shell: a collapsible side rail (desktop / tablet) plus an optional bottom nav (mobile), wrapping a routed child. Presentational only — it knows nothing about permissions, providers or routing. Callers pass the already-filtered items / mobileNavItems, the currentRoute, and the onNavigate / onLogout callbacks.
AppSidebar
The desktop / tablet side rail: header (logo + title), scrollable nav (leaves + collapsible groups) and a pinned account/logout footer. Width-animates between the expanded panel and the icon-only rail.
DashboardBreakpoints
Width thresholds that decide the AppDashboardShell layout.
One nav entry. permission = null means "always show" (e.g. logout, or items with no spec'd permission yet — visible to everyone).
A collapsible group of NavAction children, shown under a single header.
Top-level nav entry: either a single item (NavLeaf) or a group (NavBranch).
SidebarAvatar
Circular avatar: a custom widget when supplied, otherwise the user's initials on a primary-tinted disc.
SidebarCollapsedGroup
Collapsed (icon-only) group: a single icon tile whose children open as a flyout popup, mirroring shadcn's icon-rail submenu behaviour.
SidebarFooter
Pinned footer at the bottom of the sidebar: an optional account row (avatar
SidebarGroup
Expanded group: a toggle header with a rotating chevron and, when open, the children indented behind a vertical guide line.
SidebarHeader
Sidebar header with an optional logo, the appTitle and the collapse toggle. Cross-fades between the expanded and collapsed (rail) layouts.
SidebarTile
A single shadcn-style nav tile: rounded hover/active surface, leading icon, optional label (hidden in collapsed rail mode) and optional trailing.