ElevatedButton constructor Null safety

const ElevatedButton(
  1. {Key? key,
  2. required VoidCallback? onPressed,
  3. VoidCallback? onLongPress,
  4. ValueChanged<bool>? onHover,
  5. ValueChanged<bool>? onFocusChange,
  6. ButtonStyle? style,
  7. FocusNode? focusNode,
  8. bool autofocus = false,
  9. Clip clipBehavior = Clip.none,
  10. required Widget? child}

Create an ElevatedButton.

The autofocus and clipBehavior arguments must not be null.


const ElevatedButton({
  Key? key,
  required VoidCallback? onPressed,
  VoidCallback? onLongPress,
  ValueChanged<bool>? onHover,
  ValueChanged<bool>? onFocusChange,
  ButtonStyle? style,
  FocusNode? focusNode,
  bool autofocus = false,
  Clip clipBehavior = Clip.none,
  required Widget? child,
}) : super(
  key: key,
  onPressed: onPressed,
  onLongPress: onLongPress,
  onHover: onHover,
  onFocusChange: onFocusChange,
  style: style,
  focusNode: focusNode,
  autofocus: autofocus,
  clipBehavior: clipBehavior,
  child: child,