FloatingActionButton.extended constructor

const FloatingActionButton.extended(
  1. {Key? key,
  2. String? tooltip,
  3. Color? foregroundColor,
  4. Color? backgroundColor,
  5. Color? focusColor,
  6. Color? hoverColor,
  7. Object? heroTag = const _DefaultHeroTag(),
  8. double? elevation,
  9. double? focusElevation,
  10. double? hoverElevation,
  11. Color? splashColor,
  12. double? highlightElevation,
  13. double? disabledElevation,
  14. required VoidCallback? onPressed,
  15. MouseCursor? mouseCursor = SystemMouseCursors.click,
  16. ShapeBorder? shape,
  17. bool isExtended = true,
  18. MaterialTapTargetSize? materialTapTargetSize,
  19. Clip clipBehavior = Clip.none,
  20. FocusNode? focusNode,
  21. bool autofocus = false,
  22. double? extendedIconLabelSpacing,
  23. EdgeInsetsGeometry? extendedPadding,
  24. TextStyle? extendedTextStyle,
  25. Widget? icon,
  26. required Widget label,
  27. bool? enableFeedback}
)

Creates a wider StadiumBorder-shaped floating action button with an optional icon and a label.

The elevation, highlightElevation, and disabledElevation parameters, if specified, must be non-negative.

See also:

Implementation

const FloatingActionButton.extended({
  super.key,
  this.tooltip,
  this.foregroundColor,
  this.backgroundColor,
  this.focusColor,
  this.hoverColor,
  this.heroTag = const _DefaultHeroTag(),
  this.elevation,
  this.focusElevation,
  this.hoverElevation,
  this.splashColor,
  this.highlightElevation,
  this.disabledElevation,
  required this.onPressed,
  this.mouseCursor = SystemMouseCursors.click,
  this.shape,
  this.isExtended = true,
  this.materialTapTargetSize,
  this.clipBehavior = Clip.none,
  this.focusNode,
  this.autofocus = false,
  this.extendedIconLabelSpacing,
  this.extendedPadding,
  this.extendedTextStyle,
  Widget? icon,
  required Widget label,
  this.enableFeedback,
}) : assert(elevation == null || elevation >= 0.0),
     assert(focusElevation == null || focusElevation >= 0.0),
     assert(hoverElevation == null || hoverElevation >= 0.0),
     assert(highlightElevation == null || highlightElevation >= 0.0),
     assert(disabledElevation == null || disabledElevation >= 0.0),
     mini = false,
     _floatingActionButtonType = _FloatingActionButtonType.extended,
     child = icon,
     _extendedLabel = label;