elevatedButton static method

Widget elevatedButton({
  1. required String buttonName,
  2. double buttonHeight = 50.0,
  3. double? buttonWidth,
  4. required void onPressed()?,
  5. TextStyle? style,
})

Implementation

static Widget elevatedButton(
    {required String buttonName,
    double buttonHeight = 50.0,
    double? buttonWidth,
    required void Function()? onPressed,
    TextStyle? style}) {
  return SizedBox(
      height: buttonHeight,
      width: buttonWidth,
      child: ElevatedButton(
          style: ButtonStyle(
              backgroundColor: MaterialStateProperty.all(
                  const Color.fromRGBO(6, 14, 41, 1)),
              shape: MaterialStateProperty.all<RoundedRectangleBorder>(
                  RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(18.0),
              ))),
          onPressed: onPressed,
          child: Text(
            buttonName,
            style: style,
          )));
}