RaisedButton.icon constructor

  1. {Key key,
  2. @required VoidCallback onPressed,
  3. VoidCallback onLongPress,
  4. ValueChanged<bool> onHighlightChanged,
  5. ButtonTextTheme textTheme,
  6. Color textColor,
  7. Color disabledTextColor,
  8. Color color,
  9. Color disabledColor,
  10. Color focusColor,
  11. Color hoverColor,
  12. Color highlightColor,
  13. Color splashColor,
  14. Brightness colorBrightness,
  15. double elevation,
  16. double highlightElevation,
  17. double disabledElevation,
  18. ShapeBorder shape,
  19. Clip clipBehavior,
  20. FocusNode focusNode,
  21. bool autofocus,
  22. MaterialTapTargetSize materialTapTargetSize,
  23. Duration animationDuration,
  24. @required Widget icon,
  25. @required Widget label}

Create a filled button from a pair of widgets that serve as the button's icon and label.

The icon and label are arranged in a row and padded by 12 logical pixels at the start, and 16 at the end, with an 8 pixel gap in between.

The elevation, highlightElevation, disabledElevation, icon, label, and clipBehavior arguments must not be null.


factory RaisedButton.icon({
  Key key,
  @required VoidCallback onPressed,
  VoidCallback onLongPress,
  ValueChanged<bool> onHighlightChanged,
  ButtonTextTheme textTheme,
  Color textColor,
  Color disabledTextColor,
  Color color,
  Color disabledColor,
  Color focusColor,
  Color hoverColor,
  Color highlightColor,
  Color splashColor,
  Brightness colorBrightness,
  double elevation,
  double highlightElevation,
  double disabledElevation,
  ShapeBorder shape,
  Clip clipBehavior,
  FocusNode focusNode,
  bool autofocus,
  MaterialTapTargetSize materialTapTargetSize,
  Duration animationDuration,
  @required Widget icon,
  @required Widget label,
}) = _RaisedButtonWithIcon;