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