RaisedButton.icon constructor Null safety

  1. @Deprecated('Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). ' 'This feature was deprecated after v1.26.0-18.0.pre.')
RaisedButton.icon(
  1. {Key? key,
  2. required VoidCallback? onPressed,
  3. VoidCallback? onLongPress,
  4. ValueChanged<bool>? onHighlightChanged,
  5. MouseCursor? mouseCursor,
  6. ButtonTextTheme? textTheme,
  7. Color? textColor,
  8. Color? disabledTextColor,
  9. Color? color,
  10. Color? disabledColor,
  11. Color? focusColor,
  12. Color? hoverColor,
  13. Color? highlightColor,
  14. Color? splashColor,
  15. Brightness? colorBrightness,
  16. double? elevation,
  17. double? highlightElevation,
  18. double? disabledElevation,
  19. ShapeBorder? shape,
  20. Clip clipBehavior,
  21. FocusNode? focusNode,
  22. bool autofocus,
  23. EdgeInsetsGeometry? padding,
  24. MaterialTapTargetSize? materialTapTargetSize,
  25. Duration? animationDuration,
  26. required Widget icon,
  27. 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.

Implementation

@Deprecated(
  'Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). '
  'This feature was deprecated after v1.26.0-18.0.pre.',
)
factory RaisedButton.icon({
  Key? key,
  required VoidCallback? onPressed,
  VoidCallback? onLongPress,
  ValueChanged<bool>? onHighlightChanged,
  MouseCursor? mouseCursor,
  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,
  EdgeInsetsGeometry? padding,
  MaterialTapTargetSize? materialTapTargetSize,
  Duration? animationDuration,
  required Widget icon,
  required Widget label,
}) = _RaisedButtonWithIcon;