Flutter: Building an ExpansionTile from Sqlite table

130 Views Asked by At

Looking for some guidance on building expansionTile list dynamically from a SQLite table.

Table structure:

id   parentid   heading     subheading
---  --------   -------     ----------
1    0          Head 1      Subhead 1
2    1          Head 1.1    Subhead 1.1
3    1          Head 1.2    Subhead 1.2
4    3          Head 1.2.1  Subhead 3.1
5    0          Head 2      Subhead 2
...

The goal is to show an ExpansionTile that would show the first two objects (item 1 and 5) and when clicking the first one, it should show items 2 and 3. Clicking item 3, should show item 4 and so on.

0

There are 0 best solutions below