ExpandableListTileButton.listTile constructor
ExpandableListTileButton.listTile({})
Creates an ExpandableListTileButton with a default ListTileButton header.
Example usage:
ExpandableListTileButton.listTile(
title: Text('Tap to expand'),
expanded: Text('Expanded content here'),
);
Implementation
factory ExpandableListTileButton.listTile({
required Widget expanded,
required Widget title,
Widget? subtitle,
Color? backgroundColor,
Color? expandedColor,
Color? trailingIconColor,
Color? borderColor,
double elevation = 4.0,
Widget? leading,
}) {
return ExpandableListTileButton(
expanded: expanded,
title: title,
subtitle: subtitle,
backgroundColor: backgroundColor,
expandedColor: expandedColor,
trailingIconColor: trailingIconColor,
borderColor: borderColor,
elevation: elevation,
leading: leading,
customHeader: (toggleExpansion, isExpanded) => ListTileButton(
onPressed: () => toggleExpansion.call(),
leading: leading,
body: title,
subtitle: subtitle,
trailing: Icon(
isExpanded ? Icons.expand_less : Icons.expand_more,
color: trailingIconColor,
),
backgroundColor: backgroundColor,
),
);
}