ExpandableListTileButton.iconListTile constructor
ExpandableListTileButton.iconListTile({
- Key? key,
- required Widget expanded,
- required IconData icon,
- required Widget title,
- Widget? subtitle,
- Color? headerBackgroundColor,
- Color? expandedBodyColor,
- Color? backgroundColor,
- Color? expandedColor,
- EdgeInsetsGeometry? leadingPadding,
- EdgeInsetsGeometry? trailingPadding,
- Color? iconColor,
- Color? trailingIconColor,
- Color? borderColor,
- Color? shadowColor,
- double elevation = 1,
- double? leadingSizeFactor,
- EdgeInsetsGeometry? margin,
- double expandedBottomMargin = 16.0,
- EdgeInsetsGeometry? headerPadding,
- EdgeInsetsGeometry? headerBodyPadding,
- double? headerWidth,
- double? headerHeight,
- double? headerMinWidth,
- double? headerMaxWidth,
- double? headerMinHeight,
- double? headerMaxHeight,
- Alignment headerContentAlignment = Alignment.centerLeft,
- 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,
- Duration animationDuration = const Duration(milliseconds: 300),
- Curve animationCurve = Curves.easeInOutCubic,
- bool enableHaptics = true,
- MouseCursor mouseCursor = SystemMouseCursors.click,
- String? semanticsLabel,
- bool continuous = true,
Implementation
factory ExpandableListTileButton.iconListTile({
Key? key,
required Widget expanded,
required IconData icon,
required Widget title,
Widget? subtitle,
Color? headerBackgroundColor,
Color? expandedBodyColor,
Color? backgroundColor,
Color? expandedColor,
EdgeInsetsGeometry? leadingPadding,
EdgeInsetsGeometry? trailingPadding,
Color? iconColor,
Color? trailingIconColor,
Color? borderColor,
Color? shadowColor,
double elevation = 1,
double? leadingSizeFactor,
EdgeInsetsGeometry? margin,
double expandedBottomMargin = 16.0,
EdgeInsetsGeometry? headerPadding,
EdgeInsetsGeometry? headerBodyPadding,
double? headerWidth,
double? headerHeight,
double? headerMinWidth,
double? headerMaxWidth,
double? headerMinHeight,
double? headerMaxHeight,
Alignment headerContentAlignment = Alignment.centerLeft,
IconData trailingExpandedIcon = Icons.expand_less,
IconData trailingCollapsedIcon = Icons.expand_more,
Widget Function(bool isExpanded, bool isDisabled)? trailingBuilder,
BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)),
bool disabled = false,
bool headerDisabled = false,
AlignmentGeometry bodyAlignment = Alignment.topCenter,
ExpandableController? controller,
Duration animationDuration = const Duration(milliseconds: 300),
Curve animationCurve = Curves.easeInOutCubic,
bool enableHaptics = true,
MouseCursor mouseCursor = SystemMouseCursors.click,
String? semanticsLabel,
bool continuous = true,
}) {
return ExpandableListTileButton(
key: key,
expanded: expanded,
title: title,
subtitle: subtitle,
headerBackgroundColor: headerBackgroundColor,
backgroundColor: backgroundColor,
expandedBodyColor: expandedBodyColor,
expandedColor: expandedColor,
icon: icon,
iconColor: iconColor,
trailingIconColor: trailingIconColor,
borderColor: borderColor,
shadowColor: shadowColor,
elevation: elevation,
margin: margin,
expandedBottomMargin: expandedBottomMargin,
headerPadding: headerPadding,
headerBodyPadding: headerBodyPadding,
leadingPadding: leadingPadding,
trailingPadding: trailingPadding,
headerWidth: headerWidth,
headerHeight: headerHeight,
headerMinWidth: headerMinWidth,
headerMaxWidth: headerMaxWidth,
headerMinHeight: headerMinHeight,
headerMaxHeight: headerMaxHeight,
headerContentAlignment: headerContentAlignment,
leadingSizeFactor: leadingSizeFactor,
trailingExpandedIcon: trailingExpandedIcon,
trailingCollapsedIcon: trailingCollapsedIcon,
trailingBuilder: trailingBuilder,
borderRadius: borderRadius,
disabled: disabled,
headerDisabled: headerDisabled,
bodyAlignment: bodyAlignment,
controller: controller,
animationDuration: animationDuration,
animationCurve: animationCurve,
enableHaptics: enableHaptics,
mouseCursor: mouseCursor,
semanticsLabel: semanticsLabel,
continuous: continuous,
customHeaderBuilder:
(toggleExpansion, isExpanded, isDisabled, animValue) =>
IconListTileButton(
padding: headerPadding,
bodyPadding: headerBodyPadding,
leadingPadding: leadingPadding,
trailingPadding: trailingPadding,
width: headerWidth,
height: headerHeight,
minWidth: headerMinWidth,
maxWidth: headerMaxWidth,
minHeight: headerMinHeight ?? 60.0,
maxHeight: headerMaxHeight,
contentAlignment: headerContentAlignment,
icon: icon,
iconColor: iconColor,
leadingSizeFactor: leadingSizeFactor ?? 1.0,
title: title,
subtitle: subtitle,
trailing: isDisabled
? null
: trailingBuilder != null
? trailingBuilder(isExpanded, isDisabled)
: RotationTransition(
turns: AlwaysStoppedAnimation(animValue * 0.5),
child: Icon(
trailingCollapsedIcon,
color: trailingIconColor,
),
),
onPressed: toggleExpansion,
backgroundColor: Colors.transparent,
disabled: headerDisabled,
),
);
}