onlyBorderAndLabel static method

dynamic onlyBorderAndLabel({
  1. String? label,
  2. double? widthBTN = 250,
  3. double? heightBTN = 40,
  4. dynamic onPressed()?,
  5. Color? colorBorder,
  6. double? widthBorder = 2,
  7. Color? colorBackGround,
  8. Color? iconColor,
  9. double? iconSize,
  10. Color? labelColor,
  11. TextAlign? textAlignLabel = TextAlign.center,
  12. double? borderRadius = 5,
  13. IconData? icon,
  14. EdgeInsets? marginBTN,
})

Implementation

static onlyBorderAndLabel({
  String? label,
  double? widthBTN = 250,
  double? heightBTN = 40,
  Function()? onPressed,
  Color? colorBorder,
  double? widthBorder = 2,
  Color? colorBackGround,
  Color? iconColor,
  double? iconSize,
  Color? labelColor,
  TextAlign? textAlignLabel = TextAlign.center,
  double? borderRadius = 5,
  IconData? icon,
  EdgeInsets? marginBTN,
}) {
  return XBtnbaseForTheme(
    elevation: 0,
    widthBTN: widthBTN,
    marginBTN: marginBTN,
    heightBTN: heightBTN,
    textAlignLabel: textAlignLabel,
    label: icon != null ? null : label,
    iconColor: colorBorder,
    icon: (icon != null && (label == null || label == "")) ? icon : null,
    colorBTN: Colors.transparent,
    // styleLabel: XStyles.xStyTextForLabel(labelColor ?? colorBorder),
    decorationBTN: BoxDecoration(
        borderRadius: BorderRadius.all(Radius.circular(10)),
        color: colorBackGround,
        border: Border.all(
          color: colorBorder!,
          width: widthBorder!,
        )),
    onPressed: onPressed,
  );
}