textButton static method
Widget
textButton(
- String text, {
- double? width,
- double? height,
- double? size,
- Color textColor = Colors.black,
- double fontSize = buttonFontSize,
- FontWeight? fontWeight,
- TextOverflow? overflow,
- VoidCallback? onPressed,
- AlignmentGeometry? alignment,
- TextDecoration? decoration,
- EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
Implementation
static Widget textButton(String text,
{double? width,
double? height,
double? size,
Color textColor = Colors.black,
double fontSize = buttonFontSize,
FontWeight? fontWeight,
TextOverflow? overflow,
VoidCallback? onPressed,
AlignmentGeometry? alignment,
TextDecoration? decoration,
EdgeInsetsGeometry padding = const EdgeInsets.all(8.0)}) {
return TextButton(
onPressed: onPressed,
style: ButtonStyle(
visualDensity: VisualDensity.comfortable,
alignment: alignment,
backgroundColor: ButtonStyleButton.allOrNull<Color>(Colors.transparent),
overlayColor: ButtonStyleButton.allOrNull<Color>(Colors.transparent),
elevation: ButtonStyleButton.allOrNull<double>(0),
padding: ButtonStyleButton.allOrNull<EdgeInsetsGeometry>(padding),
maximumSize: ButtonStyleButton.allOrNull<Size>(Size(size ?? width ?? double.infinity, size ?? height ?? double.infinity)),
minimumSize: ButtonStyleButton.allOrNull<Size>(Size(size ?? width ?? 0, size ?? height ?? 0))),
child: Text(text, style: TextStyle(color: textColor, fontSize: fontSize, fontWeight: fontWeight, decoration: decoration), overflow: overflow),
);
}