MyButton constructor Null safety

const MyButton(
  1. {Key? key,
  2. String? text = '',
  3. @required VoidCallback? onPressed}
)

Implementation

const MyButton({
  Key? key,
  this.text = '',
  @required this.onPressed,
}) : super(key: key);