FloatingActionButton.extended constructor Null safety
- {Key? key,
- String? tooltip,
- Color? foregroundColor,
- Color? backgroundColor,
- Color? focusColor,
- Color? hoverColor,
- Object? heroTag = const _DefaultHeroTag(),
- double? elevation,
- double? focusElevation,
- double? hoverElevation,
- Color? splashColor,
- double? highlightElevation,
- double? disabledElevation,
- required VoidCallback? onPressed,
- MouseCursor? mouseCursor = SystemMouseCursors.click,
- ShapeBorder? shape,
- bool isExtended = true,
- MaterialTapTargetSize? materialTapTargetSize,
- Clip clipBehavior = Clip.none,
- FocusNode? focusNode,
- bool autofocus = false,
- double? extendedIconLabelSpacing,
- EdgeInsetsGeometry? extendedPadding,
- TextStyle? extendedTextStyle,
- Widget? icon,
- required Widget label,
- bool? enableFeedback}
Creates a wider StadiumBorder-shaped floating action button with
an optional icon
and a label
.
The label
, autofocus, and clipBehavior arguments must not be null.
Additionally, elevation, highlightElevation, and disabledElevation
(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),
assert(isExtended != null),
assert(clipBehavior != null),
assert(autofocus != null),
mini = false,
_floatingActionButtonType = _FloatingActionButtonType.extended,
child = icon,
_extendedLabel = label;