outlineButton static method

dynamic outlineButton({
  1. dynamic buttonText,
  2. dynamic buttonColor,
  3. dynamic cornerRadius,
  4. dynamic onClick,
  5. dynamic textColor,
  6. dynamic fontSize,
  7. dynamic verticalPadding,
  8. dynamic horizontalPadding,
  9. dynamic showIndicator,
  10. dynamic buttonIcon,
  11. dynamic shadowColor,
  12. dynamic elevation,
  13. dynamic style,
})

Implementation

static outlineButton({
  var buttonText,
  var buttonColor,
  var cornerRadius,
  var onClick,
  var textColor,
  var fontSize,
  var verticalPadding,
  var horizontalPadding,
  var showIndicator,
  var buttonIcon,
  var shadowColor,
  var elevation,
  var style,
}) {
  return OutlinedButton(
      onPressed: onClick ?? () {},
      style: OutlinedButton.styleFrom(
          shadowColor: shadowColor ?? CommonColors.white,
          elevation: elevation ?? radius_1,
          backgroundColor: buttonColor ?? CommonColors.white,
          shape: RoundedRectangleBorder(
              borderRadius:
                  BorderRadius.circular(cornerRadius ?? radius_100)),
          padding: EdgeInsets.symmetric(
              vertical: verticalPadding ?? margin_16,
              horizontal: horizontalPadding ?? margin_10)),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          CommonWidgets.commonText(buttonText,
              style: GoogleFonts.poppins(
                  textStyle: TextStyle(
                      color: textColor ?? CommonColors.black,
                      fontSize: fontSize ?? font_16,
                      fontWeight: FontWeight.w600,
                      height: 1.5))),
          CommonWidgets.sizedBox(width: margin_5),
          buttonIcon ?? Container()
        ],
      ));
}