UButton constructor

UButton({
  1. Key? key,
  2. Color? color,
  3. EdgeInsetsGeometry? margin,
  4. double? width = double.infinity,
  5. double? height = 45,
  6. bool enabled = true,
  7. bool visible = true,
  8. Widget? child,
  9. String? text,
  10. GestureTapCallback? onTap,
  11. 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)));