ButtonComponent constructor

const ButtonComponent({
  1. required String label,
  2. required void onPressed(),
  3. AnsiColorType buttonColor = const ColorRGB(0, 0, 0),
  4. AnsiColorType outerBorderColor = const ColorRGB(50, 50, 50),
  5. AnsiColorType textColor = const ColorRGB(255, 255, 255),
  6. BorderStyle borderStyle = BorderStyle.empty,
  7. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 3),
})

Creates a new ButtonComponent with the given label and onPressed callback.

The appearance can be customized through optional parameters such as buttonColor, textColor, outerBorderColor, borderStyle, and padding.

Implementation

const ButtonComponent({
  required this.label,
  required this.onPressed,
  this.buttonColor = const ColorRGB(0, 0, 0),
  this.outerBorderColor = const ColorRGB(50, 50, 50),
  this.textColor = const ColorRGB(255, 255, 255),
  this.borderStyle = BorderStyle.empty,
  super.padding = const EdgeInsets.symmetric(horizontal: 3),
});