CustomButton constructor

const CustomButton({
  1. Key? key,
  2. required String text,
  3. VoidCallback? onPressed,
  4. double height = 48,
  5. double borderRadius = 10,
  6. Color backgroundColor = AppColors.primary,
  7. Color textColor = Colors.white,
  8. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 24),
})

Implementation

const CustomButton({
  super.key,
  required this.text,
  this.onPressed, // nullable
  this.height = 48,
  this.borderRadius = 10,
  this.backgroundColor = AppColors.primary,
  this.textColor = Colors.white,
  this.padding = const EdgeInsets.symmetric(horizontal: 24),
});