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, @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.

Implementation

FloatingActionButton.extended({
  Key key,
  this.tooltip,
  this.foregroundColor,
  this.backgroundColor,
  this.heroTag = const _DefaultHeroTag(),
  this.elevation = 6.0,
  this.highlightElevation = 12.0,
  @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),
      assert(highlightElevation != null),
      assert(shape != null),
      assert(isExtended != null),
      assert(clipBehavior != null),
      _sizeConstraints = _kExtendedSizeConstraints,
      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);