Pub Version GitHub GitHub GitHub

Simplify building custom UIs with accessible controls for showing and hiding content, like accordion panels.

Preview

Demo

Usage

To read more about classes and other references used by disclosure, see the API Reference.

/** spellchecker: disable */
Card.outlined(
  clipBehavior: Clip.hardEdge,
  child: Disclosure(
    header: DisclosureButton(
      child: ListTile(
        title: Text('Disclosure Panel'),
        trailing: DisclosureIcon(),
      ),
    ),
    divider: Divider(height: 1),
    child: DisclosureView(
      maxHeight: 200,
      padding: EdgeInsets.all(15.0),
      child: Text(
        "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
      ),
    ),
  ),
)

Sponsoring

Buy Me A Coffee Ko-Fi

If this package or any other package I created is helping you, please consider to sponsor me so that I can take time to read the issues, fix bugs, merge pull requests and add features to these packages.

Libraries

disclosure