Expandable ListView flutter

1,081

You're looking for the ExpansionTile widget. It's used for this kind of task. Here is the documentation on it: http://api.flutter.dev/flutter/material/ExpansionTile-class.html

Here is a quick example:

ExpansionTile(
  childrenPadding: const EdgeInsets.all(8.0),
  leading: Container(
                 decoration: BoxDecoration(
         color: Colors.purple,
         shape: BoxShape.circle,
       ),
       child: Text(
       '1',
        ),
    ),
  title: Text(
        'Introduction',
        style: Theme.of(context).textTheme.headline6,
      ),
   children: children // Some list of List Tile's or widget of that kind,
),
Share:
1,081
SinaMN75
Author by

SinaMN75

Updated on December 30, 2022

Comments

  • SinaMN75
    SinaMN75 6 minutes

    how can I have a ListView inside another expandable ListView like this: