Skip to content
pubscout

accordion

2.6.0, released 3 years ago by vulcansoft.com

An expandable and collapsible accordion list widget for Flutter.

WASM-ready
$ flutter pub add accordion
Source repository

What it does

Provides a stylish accordion widget where sections can be expanded or collapsed by clicking their headers. Supports global and individual styling properties, haptic feedback, automatic scrolling of opened items, and nested accordions.

AI-written summary of version 2.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need an expandable FAQ list or collapsible sections in your UI.
  • You want customizable header and content styling with built-in animations.

Skip it when

  • You wrap the entire accordion in a global state management system that triggers full rebuilds during opening animations.
  • You need complex data grid or tree structures rather than simple collapsible sections.

Strengths

  • Many preset properties for styling headers and content globally or per section.
  • Supports auto-closing previous sections via maxOpenSections.
  • Built-in scroll into view and haptic feedback options.

Weaknesses

  • Improper state management placement around the widget can cause unintended opening animation replays.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2
Accordion(
  maxOpenSections: 1,
  headerBackgroundColorOpened: Colors.black54,
  headerPadding: EdgeInsets.symmetric(horizontal: 15, vertical: 8),
  children: [
    AccordionSection(
      isOpen: true,
      header: Text('Section 1', style: TextStyle(color: Colors.white, fontSize: 15)),
      content: Text('Inside Accordion 1'),
    ),
  ],
)

Alternatives

Packages that do the same job and could replace accordion.

Works with

Packages commonly used together with accordion: ones it builds on, ones built on it, and its own family.