FloatingActionButton constructor

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

Creates a circular floating action button.

The elevation, highlightElevation, mini, shape, and clipBehavior arguments must not be 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 = 6.0,
  this.highlightElevation = 12.0,
  double disabledElevation,
  @required this.onPressed,
  this.mini = false,
  this.shape = const CircleBorder(),
  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(shape != null),
     assert(isExtended != null),
     _sizeConstraints = mini ? _kMiniSizeConstraints : _kSizeConstraints,
     disabledElevation = disabledElevation ?? elevation,
     super(key: key);