CustomButton constructor

const CustomButton({
  1. Key? key,
  2. double? height,
  3. double? width,
  4. bool? withEffect = true,
  5. required Function onTap,
  6. required String text,
  7. Color? buttonColor = whiteColor,
  8. TextDecoration? textDecoration = TextDecoration.none,
  9. Color? textColor = blackColor,
  10. double? radius = 10.0,
  11. TextAlign? textAlign = TextAlign.center,
  12. FontWeight? fontWeight = fontWeigh500,
  13. EdgeInsetsGeometry? padding = EdgeInsets.zero,
  14. Widget? progressIndicator = const CircularProgressIndicator(strokeWidth: 6, valueColor: AlwaysStoppedAnimation<Color>(whiteColor)),
  15. bool? isLoading = false,
})

Implementation

const CustomButton({
  Key? key,
  this.height,
  this.width,
  this.withEffect = true,
  required this.onTap,
  required this.text,
  this.buttonColor = whiteColor,
  this.textDecoration = TextDecoration.none,
  this.textColor = blackColor,
  this.radius = 10.0,
  this.textAlign = TextAlign.center,
  this.fontWeight = fontWeigh500,
  this.padding = EdgeInsets.zero,
  this.progressIndicator = const CircularProgressIndicator(
      strokeWidth: 6, valueColor: AlwaysStoppedAnimation<Color>(whiteColor)),
  this.isLoading = false,
}) : super(key: key);