button method
Widget
button(
- bool cupertino,
- String? text,
- BuildContext context,
- VoidCallback? onPressed,
- 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
),
),
),
),
),
);
}