CarbonButton constructor
const
CarbonButton({})
Constructs an instance of CarbonButton.
Parameters:
label
: The label text of the button.onPressed
: The callback to be executed when the button is pressed.isLoading
: Indicates whether the button is in a loading state (default is false).isExpanded
: Indicates whether the button should expand to fill available space (default is false).color
: The background color of the button (optional).icon
: The icon to display on the button (optional).isBottomButton
: Indicates whether the button is a bottom button (default is false).
Implementation
const CarbonButton({
super.key,
required this.label,
required this.onPressed,
this.isLoading = false,
this.isExpanded = false,
this.color,
this.icon,
this.isBottomButton = false,
});