UButton constructor
UButton({
- Key? key,
- Color? color,
- EdgeInsetsGeometry? margin,
- double? width = double.infinity,
- double? height = 45,
- bool enabled = true,
- bool visible = true,
- Widget? child,
- String? text,
- GestureTapCallback? onTap,
- AlignmentGeometry? alignment = Alignment.center,
Implementation
UButton({
super.key,
super.color,
super.margin,
super.width = double.infinity,
super.height = 45,
bool enabled = true,
super.visible = true,
Widget? child,
String? text,
GestureTapCallback? onTap,
super.alignment = Alignment.center,
}) : super(
heroTag: text,
child: child ??
BText(text ?? '', style: const TStyle(color: UCS.white)),
onTap: enabled ? onTap : null,
decoration: BoxDecoration(
border: Border.all(color: GlobalConfig().currentColor),
color: color ?? GlobalConfig().currentColor,
borderRadius: BorderRadius.circular(8)));