UButton constructor

UButton({
  1. Key? key,
  2. Color? color,
  3. required String text,
  4. EdgeInsetsGeometry? margin,
  5. double? width = UConst.longWidth,
  6. double? height = 45,
  7. bool enabled = true,
  8. bool visible = true,
  9. Widget? child,
  10. GestureTapCallback? onTap,
  11. AlignmentGeometry? alignment = Alignment.center,
})

Implementation

UButton({
  super.key,
  super.color,
  required String text,
  super.margin,
  super.width = UConst.longWidth,
  super.height = 45,
  bool enabled = true,
  super.visible = true,
  Widget? child,
  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)));