UiButton.text constructor
UiButton.text({
- Key? key,
- String? label,
- Widget? icon,
- required VoidCallback? onPressed,
- Color? foregroundColor,
- EdgeInsetsGeometry? padding,
- TextStyle? labelStyle,
- bool expand = false,
- String? tooltip,
Implementation
factory UiButton.text({
Key? key,
String? label,
Widget? icon,
required VoidCallback? onPressed,
Color? foregroundColor,
EdgeInsetsGeometry? padding,
TextStyle? labelStyle,
bool expand = false,
String? tooltip,
}) {
return UiButton._internal(
key: key,
label: label,
icon: icon,
onPressed: onPressed,
expand: expand,
tooltip: tooltip,
type: _UiButtonType.text,
style: TextButton.styleFrom(
backgroundColor: Colors.transparent,
foregroundColor: foregroundColor ?? primary,
padding:
padding ?? const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
textStyle: labelStyle ??
const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
);
}