Menu

1 / 5

expandable_panel: collapsible panels for Flutter with accordions, a11y and RTL

DEV Community: mobile·Abdeldjalil Chougui·12 days ago
#Sl7SC8SU
#devtomobile#devto#dev#expandable#panel
Long article (1454 words) — no AI summary yet.
Reading 0:00
15s threshold

An expandable panel looks like one of the simplest widgets in an app: a header, a body, and a tap that shows or hides the body. Then the details arrive. The panel sits in a list and has to scroll into view when it opens. A FAQ page wants only one answer open at a time. A screen reader has to announce whether the section is open. The icon has to move to the other side in Arabic. And the app has to remember what was open after Android kills and restores it.

The expandable package is a well-known answer to this. expandable_panel is a package with the same widgets and nearly the same API, written from scratch, that adds accordion groups, accessibility, keyboard support, RTL layouts, reduced motion and state restoration, and fixes a list of known issues. The README says most apps can migrate by changing one import.

What it does

A familiar API.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.