IconButton constructor

const IconButton({Key key, double iconSize: 24.0, EdgeInsetsGeometry padding: const EdgeInsets.all(8.0), AlignmentGeometry alignment: Alignment.center, @required Widget icon, Color color, Color highlightColor, Color splashColor, Color disabledColor, @required VoidCallback onPressed, String tooltip })

Creates an icon button.

Icon buttons are commonly used in the AppBar.actions field, but they can be used in many other places as well.

Requires one of its ancestors to be a Material widget.

The iconSize, padding, and alignment arguments must not be null (though they each have default values).

The icon argument must be specified, and is typically either an Icon or an ImageIcon.

Implementation

const IconButton({
  Key key,
  this.iconSize = 24.0,
  this.padding = const EdgeInsets.all(8.0),
  this.alignment = Alignment.center,
  @required this.icon,
  this.color,
  this.highlightColor,
  this.splashColor,
  this.disabledColor,
  @required this.onPressed,
  this.tooltip
}) : assert(iconSize != null),
     assert(padding != null),
     assert(alignment != null),
     assert(icon != null),
     super(key: key);