textActionButtonWidget function

Widget textActionButtonWidget({
  1. required String text,
  2. required VoidCallback? onPressed,
  3. Color? backgroundColor,
  4. Color? disabledBackgroundColor,
  5. Color? textColor = Colors.white,
  6. Color? disabledTextColor,
  7. BorderRadius? borderRadius,
  8. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
  9. EdgeInsets margin = const EdgeInsets.symmetric(horizontal: 13, vertical: 15),
  10. double fontSize = 11,
  11. Size? minimumSize,
  12. Size? fixedSize,
  13. Size? maximumSize,
  14. FontWeight? fontWeight,
})

Implementation

Widget textActionButtonWidget({
  required String text,
  required VoidCallback? onPressed,
  Color? backgroundColor,
  Color? disabledBackgroundColor,
  Color? textColor = Colors.white,
  Color? disabledTextColor,
  BorderRadius? borderRadius,
  EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
  EdgeInsets margin = const EdgeInsets.symmetric(horizontal: 13, vertical: 15),
  double fontSize = 11,
  Size? minimumSize,
  Size? fixedSize,
  Size? maximumSize,
  FontWeight? fontWeight,
}) {
  //disable 0.3不透明度
  disabledTextColor ??= textColor?.withOpacity(0.3);
  return textButtonWidget(
    text: text,
    onPressed: onPressed,
    backgroundColor: backgroundColor,
    disabledBackgroundColor: disabledBackgroundColor,
    textColor: textColor,
    disabledTextColor: disabledTextColor,
    borderRadius: borderRadius,
    padding: padding,
    margin: margin,
    fontSize: fontSize,
    minimumSize: minimumSize,
    fixedSize: fixedSize,
    maximumSize: maximumSize,
    fontWeight: fontWeight,
  );
}