RectButtonComponent constructor
RectButtonComponent({})
Creates a RectButtonComponent.
onPressed is the callback triggered when the button is pressed.
label is the text displayed on the button.
size and position define the size and position of the button.
color is the default background color.
pressedColor is the background color when pressed. Defaults to color.
textColor is the color of the label text.
Implementation
RectButtonComponent({
required this.onPressed,
required this.label,
required super.size,
required super.position,
required this.color,
Color? pressedColor,
this.textColor = Colors.white,
}) : pressedColor = pressedColor ?? color,
currentColor = color;