button method

Widget button(
  1. bool cupertino,
  2. String? text,
  3. BuildContext context,
  4. VoidCallback? onPressed,
  5. Color color,
)

Implementation

Widget button(bool cupertino, String? text, BuildContext context,
    VoidCallback? onPressed, Color color) {
      return cupertino
      ? CupertinoDialogAction(
          textStyle: widget.cupertinoButtonTextStyle,
          onPressed: onPressed,
          child: Text(text ?? ''))
      : Expanded(
          child: TextButton(onPressed: onPressed, child: Container(
              height: widget.buttonSize,
              decoration: BoxDecoration(
                border: Border.all(
                  color: widget.buttonBorderColor,
                ),
                color: color,
                borderRadius: BorderRadius.circular(50),
              ),
              child: Center(
                child: Text(
                  text??'',
                  style: TextStyle(
                    color: Colors.white,
                    fontWeight: FontWeight.bold,
                    fontSize: widget.buttonFontSize
                  ),
                ),
              ),
            ),
        ),
      );
}