customButton static method
dynamic
customButton({})
Implementation
static customButton(
{String? buttonText,
Color? buttonColor,
double? cornerRadius,
onClick,
var textColor,
double? fontSize,
double? verticalPadding,
double? horizontalPadding,
ButtonStyle? style}) {
return ElevatedButton(
onPressed: onClick ?? () {},
style: ElevatedButton.styleFrom(
backgroundColor: buttonColor ?? Colors.green,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(cornerRadius ?? 100.0)),
padding: EdgeInsets.symmetric(
vertical: verticalPadding ?? 16.0,
horizontal: horizontalPadding ?? 10.0)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
buttonText!,
style: TextStyle(
color: textColor ?? Colors.white,
fontSize: fontSize ?? 16.0,
fontWeight: FontWeight.w600,
height: 1.5),
),
const SizedBox(
width: 5.0,
),
],
));
}