RawMaterialButton constructor

const RawMaterialButton({Key key, @required VoidCallback onPressed, ValueChanged<bool> onHighlightChanged, TextStyle textStyle, Color fillColor, Color highlightColor, Color splashColor, double elevation: 2.0, double highlightElevation: 8.0, double disabledElevation: 0.0, EdgeInsetsGeometry padding: EdgeInsets.zero, BoxConstraints constraints: const BoxConstraints(minWidth: 88.0, minHeight: 36.0), ShapeBorder shape: const RoundedRectangleBorder(), Duration animationDuration: kThemeChangeDuration, Clip clipBehavior: Clip.none, MaterialTapTargetSize materialTapTargetSize, Widget child })

Create a button based on Semantics, Material, and InkWell widgets.

The shape, elevation, padding, constraints, and clipBehavior arguments must not be null.

Implementation

const RawMaterialButton({
  Key key,
  @required this.onPressed,
  this.onHighlightChanged,
  this.textStyle,
  this.fillColor,
  this.highlightColor,
  this.splashColor,
  this.elevation = 2.0,
  this.highlightElevation = 8.0,
  this.disabledElevation = 0.0,
  this.padding = EdgeInsets.zero,
  this.constraints = const BoxConstraints(minWidth: 88.0, minHeight: 36.0),
  this.shape = const RoundedRectangleBorder(),
  this.animationDuration = kThemeChangeDuration,
  this.clipBehavior = Clip.none,
  MaterialTapTargetSize materialTapTargetSize,
  this.child,
}) : materialTapTargetSize = materialTapTargetSize ?? MaterialTapTargetSize.padded,
     assert(shape != null),
     assert(elevation != null),
     assert(highlightElevation != null),
     assert(disabledElevation != null),
     assert(padding != null),
     assert(constraints != null),
     assert(animationDuration != null),
     assert(clipBehavior != null),
     super(key: key);