createCustomButton static method
Widget
createCustomButton(
- dynamic onPress,
- dynamic title, {
- dynamic color,
- dynamic textColor = Colors.white,
- dynamic elevation = 4.0,
- dynamic borderColor = Colors.transparent,
- dynamic fontSize,
- dynamic fontWeight = FontWeight.bold,
- dynamic borderWidth = 1.0,
- 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));