createCustomButton static method

Widget createCustomButton(
  1. dynamic onPress,
  2. dynamic title, {
  3. dynamic color,
  4. dynamic textColor = Colors.white,
  5. dynamic elevation = 4.0,
  6. dynamic borderColor = Colors.transparent,
  7. dynamic fontSize,
  8. dynamic fontWeight = FontWeight.bold,
  9. dynamic borderWidth = 1.0,
  10. double? radius,
})

Implementation

static Widget createCustomButton(onPress, title, {color,
  textColor = Colors.white, elevation = 4.0,
  borderColor = Colors.transparent, fontSize,
  fontWeight = FontWeight.bold, borderWidth = 1.0, double? radius}) => ElevatedButton(
        style: ElevatedButton.styleFrom(
          primary: color??StyleCustom.buttonColor,
          elevation: elevation,
          shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(radius ?? 80.sp),
              side: BorderSide(color: borderColor, width: borderWidth)),
        ),onPressed: onPress,
    child: createLabel(title, color: textColor, fontWeight: fontWeight, fontSize: fontSize));