ExpandableListTileButton.overlayMenu constructor

ExpandableListTileButton.overlayMenu({
  1. Key? key,
  2. required Widget expanded,
  3. required Widget title,
  4. Widget? subtitle,
  5. Widget? leading,
  6. Color? headerBackgroundColor,
  7. Color? expandedBodyColor,
  8. Color? trailingIconColor,
  9. Color? borderColor,
  10. double elevation = 1,
  11. EdgeInsetsGeometry? margin,
  12. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)),
  13. bool disabled = false,
  14. AlignmentGeometry bodyAlignment = Alignment.center,
  15. ExpandableController? controller,
  16. double leadingSizeFactor = 1,
  17. Size? trailingSize,
})

Creates a tile whose expanded content floats in an Overlay above other widgets.

Implementation

factory ExpandableListTileButton.overlayMenu({
  Key? key,
  required Widget expanded,
  required Widget title,
  Widget? subtitle,
  Widget? leading,
  Color? headerBackgroundColor,
  Color? expandedBodyColor,
  Color? trailingIconColor,
  Color? borderColor,
  double elevation = 1,
  EdgeInsetsGeometry? margin,
  BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)),
  bool disabled = false,
  AlignmentGeometry bodyAlignment = Alignment.center,
  ExpandableController? controller,
  double leadingSizeFactor = 1,
  Size? trailingSize,
}) {
  return ExpandableListTileButton(
    key: key,
    expanded: expanded,
    title: title,
    subtitle: subtitle,
    leading: leading,
    headerBackgroundColor: headerBackgroundColor,
    expandedBodyColor: expandedBodyColor,
    trailingIconColor: trailingIconColor,
    borderColor: borderColor,
    elevation: elevation,
    margin: margin,
    borderRadius: borderRadius,
    disabled: disabled,
    bodyAlignment: bodyAlignment,
    controller: controller,
    trailingSize: trailingSize,
    overlay: true,
    customHeaderBuilder: (toggle, isExp, isDis) => ListTileButton(
      onPressed: toggle,
      leading: leading,
      leadingSizeFactor: leadingSizeFactor,
      body: title,
      subtitle: subtitle,
      trailing: trailingSize != null
          ? SizedBox.fromSize(
              size: trailingSize,
              child: Icon(
                isExp ? Icons.expand_less : Icons.expand_more,
                color: trailingIconColor,
              ),
            )
          : Icon(
              isExp ? Icons.expand_less : Icons.expand_more,
              color: trailingIconColor,
            ),
      backgroundColor: Colors.transparent,
      disabled: isDis,
    ),
  );
}