macosui / macos_ui

Flutter widgets and themes implementing the current macOS design language.
https://macosui.github.io/macos_ui/#/
MIT License
1.87k stars 182 forks source link

Section header #292

Open agostinofiscale opened 2 years ago

agostinofiscale commented 2 years ago

Use case

Section header are useful to divide different area in sidebar.

Proposal

In the following png you can see what I mean by saying "Section header", we could refacto the SidebarItem when there are disclosureItems but I think we can find ourself in a spaghetti plate.

image

What if we improve the sidebar by making it more modular and separating the components for their task?

Something like:

  1. SidebarItem
  2. SidebarFolder
  3. SidebarSection

btw thank you for your work! :)

GroovinChip commented 2 years ago

Hello @agostinofiscale! Thanks for the feature request.

Yes, this is certainly an improvement that should be made. Currently, SidebarItems builds one ListView. Perhaps it would be prudent to make Sidebar take a List of SidebarSections, which would each expect a List of SidebarItems. It would be tricky because there would be ListViews inside of ListViews, but maybe Slivers are the answer to that question 🤔

iamaz007 commented 12 months ago

Hello!

Any update about this feature? This issue was opened year ago but didn't see any progress.

Thanks for this amazing package.

nu11ptr commented 4 months ago

Are there any workarounds or clever hacks to get the same effect? I was going to do this manually with multiple sidebars, but it seems there is no current way to have an unselected sidebar, so both would have an item selected which obviously isn't right.