FloatingActionButton.extended constructor

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

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

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

Implementation

FloatingActionButton.extended({
  Key key,
  this.tooltip,
  this.foregroundColor,
  this.backgroundColor,
  this.heroTag = const _DefaultHeroTag(),
  this.elevation = 6.0,
  this.highlightElevation = 12.0,
  double disabledElevation,
  @required this.onPressed,
  this.shape = const StadiumBorder(),
  this.isExtended = true,
  this.materialTapTargetSize,
  this.clipBehavior = Clip.none,
  @required Widget icon,
  @required Widget label,
}) : assert(elevation != null && elevation >= 0.0),
     assert(highlightElevation != null && highlightElevation >= 0.0),
     assert(disabledElevation == null || disabledElevation >= 0.0),
     assert(shape != null),
     assert(isExtended != null),
     assert(clipBehavior != null),
     _sizeConstraints = _kExtendedSizeConstraints,
     disabledElevation = disabledElevation ?? elevation,
     mini = false,
     child = _ChildOverflowBox(
       child: Row(
         mainAxisSize: MainAxisSize.min,
         children: <Widget>[
           const SizedBox(width: 16.0),
           icon,
           const SizedBox(width: 8.0),
           label,
           const SizedBox(width: 20.0),
         ],
       ),
     ),
     super(key: key);