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.…