FloatingActionButton constructor

const FloatingActionButton({Key key, Widget child, String tooltip, Color foregroundColor, Color backgroundColor, Object heroTag: const _DefaultHeroTag(), double elevation, double highlightElevation, double disabledElevation, @required VoidCallback onPressed, bool mini: false, ShapeBorder shape, Clip clipBehavior: Clip.none, MaterialTapTargetSize materialTapTargetSize, bool isExtended: false })

Creates a circular floating action button.

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

Implementation

const FloatingActionButton({
  Key key,
  this.child,
  this.tooltip,
  this.foregroundColor,
  this.backgroundColor,
  this.heroTag = const _DefaultHeroTag(),
  this.elevation,
  this.highlightElevation,
  this.disabledElevation,
  @required this.onPressed,
  this.mini = false,
  this.shape,
  this.clipBehavior = Clip.none,
  this.materialTapTargetSize,
  this.isExtended = false,
}) : assert(elevation == null || elevation >= 0.0),
     assert(highlightElevation == null || highlightElevation >= 0.0),
     assert(disabledElevation == null || disabledElevation >= 0.0),
     assert(mini != null),
     assert(isExtended != null),
     _sizeConstraints = mini ? _kMiniSizeConstraints : _kSizeConstraints,
     super(key: key);