CarbonButton constructor

const CarbonButton({
  1. Key? key,
  2. required String label,
  3. required VoidCallback? onPressed,
  4. bool isLoading = false,
  5. bool isExpanded = false,
  6. Color? color,
  7. IconData? icon,
  8. bool isBottomButton = false,
})

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,
});