CustomButton constructor
const
CustomButton({
- Key? key,
- required String text,
- VoidCallback? onPressed,
- double height = 48,
- double borderRadius = 10,
- Color backgroundColor = AppColors.primary,
- Color textColor = Colors.white,
- 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),
});