Widget.materialButton constructor Null safety

const Widget.materialButton(
  1. {Key? key,
  2. required Callback? onPressed,
  3. Callback? onLongPress,
  4. MouseCursor? mouseCursor,
  5. Color? textColor,
  6. Color? disabledTextColor,
  7. Color? color,
  8. Color? disabledColor,
  9. Color? focusColor,
  10. Color? hoverColor,
  11. Color? highlightColor,
  12. Color? splashColor,
  13. Brightness? colorBrightness,
  14. double? elevation,
  15. double? focusElevation,
  16. double? hoverElevation,
  17. double? highlightElevation,
  18. double? disabledElevation,
  19. EdgeInsets? padding,
  20. VisualDensity? visualDensity,
  21. ShapeBorder? shape,
  22. @Default(Clip.none) Clip clipBehavior,
  23. @Default(false) bool autofocus,
  24. MaterialTapTargetSize? materialTapTargetSize,
  25. Duration? animationDuration,
  26. double? minWidth,
  27. double? height,
  28. @Default(true) bool enableFeedback,
  29. Widget? child}
)

Implementation

const factory Widget.materialButton({
  Key? key,
  required Callback? onPressed,
  Callback? onLongPress,
  MouseCursor? mouseCursor,
  Color? textColor,
  Color? disabledTextColor,
  Color? color,
  Color? disabledColor,
  Color? focusColor,
  Color? hoverColor,
  Color? highlightColor,
  Color? splashColor,
  Brightness? colorBrightness,
  double? elevation,
  double? focusElevation,
  double? hoverElevation,
  double? highlightElevation,
  double? disabledElevation,
  EdgeInsets? padding,
  VisualDensity? visualDensity,
  ShapeBorder? shape,
  @Default(Clip.none) Clip clipBehavior,
  @Default(false) bool autofocus,
  MaterialTapTargetSize? materialTapTargetSize,
  Duration? animationDuration,
  double? minWidth,
  double? height,
  @Default(true) bool enableFeedback,
  Widget? child,
}) = MaterialButton;