Sleak sidebar for responsive Flutter apps with automatic size change.
AdaptiveSidebar(
icon: Icon(Symbols.home_rounded),
title: "Example",
destinations: [
SidebarDestination(
icon: Symbols.home_rounded,
label: AppLocalizations.of(context)!.home,
),
SidebarDestination(
icon: Symbols.workspaces_rounded,
label: AppLocalizations.of(context)!.social,
),
SidebarDestination(
icon: Symbols.settings_rounded,
label: AppLocalizations.of(context)!.settings,
),
],
onPageChange: (index) {
//Do something
},
child: child,
);
The content you want to display with a sidebar.
Sidebar page options
This will be shown on top of the destination list
These destinations will be pinned at the footer
Called when a new destination has been selected
Icon shown before the title
Title of the app
Style of the title of the app
Text style of the destinations
The text and icon color of the selected destination (will defualt to Theme.of(context).primaryColor if none is provided)
size of the sidebar (Default: 192)
Add 30px padding to the top on macOS
Auto enable medium layout if passing medium breakpoint
The breakpoint size of the child space for the medium icon only layout
Manually enable and disable the medium layout
Show a bottomNavigationBar on smaller devices useing the bottomNavigationBarBreakpoint.
If no bottom navigation bar is given it will ignore the bottomNavigationBarBreakpoint and always show the sidebar.
Breakpoint of when the sidebar is enabled and the bottom navigation bar is no longer used.
Display a widget in the background behind the page and the sidebar.