macos_ui icon indicating copy to clipboard operation
macos_ui copied to clipboard

Sidebar with bottom

Open anilcngz opened this issue 3 years ago • 0 comments

Use case

There is no way to unselect a SideBarItem because we need to provide a currentIndex (It must be in the range of 0 to [items.length]). I think because of that when I add a Settings page by using bottom property as below and click on it, still SideBarItem is shown as selected.

MacosWindow(
    sidebar: Sidebar(
      top: const Text('LOGO'),
      minWidth: 200,
      builder: (context, _) => SidebarItems(
        currentIndex: _currentIndex,
        items: items,
        itemSize: SidebarItemSize.large,
        onChanged: (index) => _onItemTapped(context, index),
      ),
      bottom: MacosListTile(
        leading: const MacosIcon(CupertinoIcons.profile_circled),
        title: const Text('Settings'),
        subtitle: Text(userEmail ?? ''),
        onClick: () => context.go('/settings'),
      ),
    ),
    child: widget.child,
  )

Proposal

Screen Shot 2022-10-15 at 13 19 12

anilcngz avatar Oct 15 '22 10:10 anilcngz