disclosure
2.2.0, released 2 years ago by widgetarian.com
Build custom UIs with accessible controls for showing and hiding content.
What it does
Provides accessible widgets like Disclosure, DisclosureGroup, and DisclosureTile to easily build expand/collapse UIs, accordion panels, and spoiler texts. It supports wrapper builders, custom triggers, and multi-panel groups.
AI-written summary of version 2.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need accessible accordion panels or collapsible cards.
- You are building nested menus or disclosure tiles.
- You want custom layouts for showing and hiding content.
Skip it when
- You are looking for full complete UI component kits rather than a specific disclosure widget.
- You need non-UI state management logic.
Strengths
- Simplifies building accessible show/hide content controls.
- Includes support for groups, tiles, and custom wrappers.
- Supports theme customization and multiple layout configurations.
Weaknesses
- Limited to expand/collapse and disclosure functionality.
- Not documented for platforms outside of standard Flutter targets.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Disclosure(
header: const DisclosureButton(
child: ListTile(
title: Text('Disclosure Panel'),
trailing: DisclosureIcon(),
),
),
child: const Text('Hidden content goes here.'),
)Alternatives
Packages that do the same job and could replace disclosure.
- base_menu
Composable primitives for building accessible menu systems.
70Compare - focusable_control_builder
Easily create custom controls that respond correctly to mouse and keyboard.
60Compare - sliver_sticky_collapsable_panel
A Sliver implementation of a sticky collapsible panel with a box header and sliver child.
57Compare - tap_builder
A simple widget for building interactive areas with customizable visual effects.
50Compare