ExpandableListTileButton.custom constructor

ExpandableListTileButton.custom({
  1. required Widget expanded,
  2. required Widget customHeader(
    1. Function tapAction,
    2. bool isExpanded
    ),
  3. Color? backgroundColor,
  4. Color? expandedColor,
  5. Color? iconColor,
  6. Color? trailingIconColor,
  7. Color? borderColor,
  8. double elevation = 4.0,
})

Creates an ExpandableListTileButton with a custom header.

The customHeader builder function is used to create the header widget.

Example usage:

ExpandableListTileButton.custom(
  expanded: Text('Expanded content here'),
  customHeader: (toggleExpansion, isExpanded) => YourCustomHeaderWidget(),
);

Implementation

factory ExpandableListTileButton.custom({
  required Widget expanded,
  required Widget Function(Function tapAction, bool isExpanded) customHeader,
  Color? backgroundColor,
  Color? expandedColor,
  Color? iconColor,
  Color? trailingIconColor,
  Color? borderColor,
  double elevation = 4.0,
}) {
  return ExpandableListTileButton(
    expanded: expanded,
    backgroundColor: backgroundColor,
    expandedColor: expandedColor,
    iconColor: iconColor,
    trailingIconColor: trailingIconColor,
    borderColor: borderColor,
    elevation: elevation,
    customHeader: customHeader,
  );
}