normalButton2 static method
Widget
normalButton2({
- required Widget child,
- double? width,
- double? height,
- double? size,
- Color backgroundColor = Colors.blue,
- Color textColor = Colors.white,
- double fontSize = buttonFontSize,
- double radius = buttonRadius,
- VoidCallback? onPressed,
- EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
Implementation
static Widget normalButton2(
{required Widget child,
double? width,
double? height,
double? size,
Color backgroundColor = Colors.blue,
Color textColor = Colors.white,
double fontSize = buttonFontSize,
double radius = buttonRadius,
VoidCallback? onPressed,
EdgeInsetsGeometry padding = const EdgeInsets.all(8.0)}) {
return ElevatedButton(
onPressed: onPressed,
style: ButtonStyle(
backgroundColor: ButtonStyleButton.allOrNull<Color>(backgroundColor),
shape: ButtonStyleButton.allOrNull<OutlinedBorder>(RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius))),
overlayColor: ButtonStyleButton.allOrNull<Color>(Colors.transparent),
elevation: ButtonStyleButton.allOrNull<double>(0),
padding: ButtonStyleButton.allOrNull<EdgeInsetsGeometry>(padding),
minimumSize: ButtonStyleButton.allOrNull<Size>(Size.zero)),
child: SizedBox(height: size ?? height, width: size ?? width, child: child),
);
}