Button constructor

const Button({
  1. Key? key,
  2. required String text,
  3. VoidCallback? onPressed,
  4. bool enabled = true,
  5. ButtonStyle? style,
  6. FocusNode? focusNode,
})

Creates a Button displaying text with an optional onPressed callback.

Implementation

const Button({
  super.key,
  required this.text,
  this.onPressed,
  this.enabled = true,
  this.style,
  this.focusNode,
});