FloatingActionButton.extended constructor

FloatingActionButton.extended({Key key, String tooltip, Color foregroundColor, Color backgroundColor, Color focusColor, Color hoverColor, Object heroTag: const _DefaultHeroTag(), double elevation, double focusElevation, double hoverElevation, double highlightElevation, double disabledElevation, @required VoidCallback onPressed, ShapeBorder shape, bool isExtended: true, MaterialTapTargetSize materialTapTargetSize, Clip clipBehavior: Clip.none, FocusNode focusNode, Widget icon, @required Widget label })

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

The label and clipBehavior arguments must non-null. Additionally, elevation, highlightElevation, and disabledElevation (if specified) must be non-negative.

Implementation

FloatingActionButton.extended({
  Key key,
  this.tooltip,
  this.foregroundColor,
  this.backgroundColor,
  this.focusColor,
  this.hoverColor,
  this.heroTag = const _DefaultHeroTag(),
  this.elevation,
  this.focusElevation,
  this.hoverElevation,
  this.highlightElevation,
  this.disabledElevation,
  @required this.onPressed,
  this.shape,
  this.isExtended = true,
  this.materialTapTargetSize,
  this.clipBehavior = Clip.none,
  this.focusNode,
  Widget icon,
  @required Widget label,
}) : 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),
     _sizeConstraints = _kExtendedSizeConstraints,
     mini = false,
     child = _ChildOverflowBox(
       child: Row(
         mainAxisSize: MainAxisSize.min,
         children: icon == null
           ? <Widget>[
               const SizedBox(width: 20.0),
               label,
               const SizedBox(width: 20.0),
             ]
           : <Widget>[
               const SizedBox(width: 16.0),
               icon,
               const SizedBox(width: 8.0),
               label,
               const SizedBox(width: 20.0),
             ],
       ),
     ),
     super(key: key);