ExpandableListTileButton.custom constructor
ExpandableListTileButton.custom({
- Key? key,
- required Widget expanded,
- required Widget customHeaderBuilder(),
- Color? headerBackgroundColor,
- Color? expandedBodyColor,
- Color? backgroundColor,
- Color? expandedColor,
- Color? borderColor,
- double elevation = 1,
- EdgeInsetsGeometry? margin,
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)),
- bool disabled = false,
- AlignmentGeometry bodyAlignment = Alignment.center,
- ExpandableController? controller,
Creates an ExpandableListTileButton with a completely custom header provided by customHeaderBuilder.
Accepts both headerBackgroundColor/expandedBodyColor (preferred) and
backgroundColor/expandedColor (for backward compatibility).
Implementation
factory ExpandableListTileButton.custom({
Key? key,
required Widget expanded,
required Widget Function(
Function() tapAction,
bool isExpanded,
bool isDisabled,
)
customHeaderBuilder,
Color? headerBackgroundColor,
Color? expandedBodyColor,
Color? backgroundColor,
Color? expandedColor,
Color? borderColor,
double elevation = 1,
EdgeInsetsGeometry? margin,
BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)),
bool disabled = false,
AlignmentGeometry bodyAlignment = Alignment.center,
ExpandableController? controller,
}) {
return ExpandableListTileButton(
key: key,
expanded: expanded,
customHeaderBuilder: customHeaderBuilder,
headerBackgroundColor: headerBackgroundColor,
backgroundColor: backgroundColor,
expandedBodyColor: expandedBodyColor,
expandedColor: expandedColor,
borderColor: borderColor,
elevation: elevation,
margin: margin,
borderRadius: borderRadius,
disabled: disabled,
bodyAlignment: bodyAlignment,
controller: controller,
);
}