Button constructor

const Button({
  1. required String label,
  2. required VoidCallback onPressed,
})

Creates a new instance of the Button class.

The label parameter is required and specifies the text label for the button. The onPressed parameter is required and provides a callback function to be executed when the button is pressed.

Implementation

const Button({
  required this.label,
  required this.onPressed,
});