DefaultButton constructor

const DefaultButton({
  1. Key? key,
  2. String? btnText,
  3. double? width,
  4. VoidCallback? onButtonPressed,
  5. Color backgroundColor = Colors.black,
  6. Color textColor = Colors.white,
  7. double textFontSize = 16.0,
  8. double? leftPadding,
  9. double? rightPadding,
})

Creates a default button widget.

Parameters:

  • btnText: Text displayed on the button.
  • width: Button width. Defaults to full screen width.
  • onButtonPressed: Callback function executed when button is pressed.
  • backgroundColor: Button background color (defaults to black).
  • textColor: Button text color (defaults to white).
  • textFontSize: Font size for button text (defaults to 16.0).
  • leftPadding: Left margin. Defaults to Utils.appConstants.commonPadding.
  • rightPadding: Right margin. Defaults to Utils.appConstants.commonPadding.

Implementation

const DefaultButton(
    {super.key,
    this.btnText,
    this.width,
    this.onButtonPressed,
    this.backgroundColor = Colors.black,
    this.textColor = Colors.white,
    this.textFontSize = 16.0,
    this.leftPadding,
    this.rightPadding});