ExpandableListTileButton constructor
const
ExpandableListTileButton({
- Key? key,
- required Widget expanded,
- Widget customHeaderBuilder()?,
- Widget? title,
- Widget? subtitle,
- Color? headerBackgroundColor,
- Color? expandedBodyColor,
- Color? backgroundColor,
- Color? expandedColor,
- Color? iconColor,
- Color? trailingIconColor,
- Color? borderColor,
- Color? shadowColor,
- double elevation = 1,
- EdgeInsetsGeometry? margin,
- double expandedBottomMargin = 16.0,
- EdgeInsetsGeometry? headerPadding,
- EdgeInsetsGeometry? headerBodyPadding,
- EdgeInsetsGeometry? leadingPadding,
- EdgeInsetsGeometry? trailingPadding,
- double? headerWidth,
- double? headerHeight,
- double? headerMinWidth,
- double? headerMaxWidth,
- double? headerMinHeight,
- double? headerMaxHeight,
- Alignment headerContentAlignment = Alignment.centerLeft,
- double? leadingSizeFactor,
- Widget? leading,
- IconData? icon,
- IconData trailingExpandedIcon = Icons.expand_less,
- IconData trailingCollapsedIcon = Icons.expand_more,
- Widget trailingBuilder()?,
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)),
- bool disabled = false,
- bool headerDisabled = false,
- AlignmentGeometry bodyAlignment = Alignment.topCenter,
- ExpandableController? controller,
- Size? trailingSize,
- Duration animationDuration = const Duration(milliseconds: 300),
- Curve animationCurve = Curves.easeInOutCubic,
- bool enableHaptics = true,
- MouseCursor mouseCursor = SystemMouseCursors.click,
- String? semanticsLabel,
- bool continuous = true,
- Future<
Widget> fetchExpandedContent()?, - Widget? loadingWidget,
- Widget? errorWidget,
- bool overlay = false,
Implementation
const ExpandableListTileButton({
super.key,
required this.expanded,
this.customHeaderBuilder,
this.title,
this.subtitle,
this.headerBackgroundColor,
this.expandedBodyColor,
this.backgroundColor,
this.expandedColor,
this.iconColor,
this.trailingIconColor,
this.borderColor,
this.shadowColor,
this.elevation = 1,
this.margin,
this.expandedBottomMargin = 16.0,
this.headerPadding,
this.headerBodyPadding,
this.leadingPadding,
this.trailingPadding,
this.headerWidth,
this.headerHeight,
this.headerMinWidth,
this.headerMaxWidth,
this.headerMinHeight,
this.headerMaxHeight,
this.headerContentAlignment = Alignment.centerLeft,
this.leadingSizeFactor,
this.leading,
this.icon,
this.trailingExpandedIcon = Icons.expand_less,
this.trailingCollapsedIcon = Icons.expand_more,
this.trailingBuilder,
this.borderRadius = const BorderRadius.all(Radius.circular(10)),
this.disabled = false,
this.headerDisabled = false,
this.bodyAlignment = Alignment.topCenter,
this.controller,
this.trailingSize,
this.animationDuration = const Duration(milliseconds: 300),
this.animationCurve = Curves.easeInOutCubic,
this.enableHaptics = true,
this.mouseCursor = SystemMouseCursors.click,
this.semanticsLabel,
this.continuous = true,
this.fetchExpandedContent,
this.loadingWidget,
this.errorWidget,
bool overlay = false,
}) : _finalHeaderBackgroundColor = headerBackgroundColor ?? backgroundColor,
_finalExpandedBodyColor = expandedBodyColor ?? expandedColor,
_useOverlay = overlay,
assert(
customHeaderBuilder != null || title != null,
'Either customHeaderBuilder or title must be provided for the header.',
);