RadiantButton constructor
const
RadiantButton({
- Key? key,
- required AppTheme theme,
- required String text,
- void onPressed()?,
- double? minWidth,
- Alignment begin = Alignment.topCenter,
- Alignment end = Alignment.bottomCenter,
- EdgeInsets padding = const EdgeInsets.symmetric(vertical: 8, horizontal: 24),
- double borderRadius = 40,
- TextStyle? textStyle = const TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 20),
Implementation
const RadiantButton({
super.key,
required this.theme,
required this.text,
this.onPressed,
this.minWidth,
this.begin = Alignment.topCenter,
this.end = Alignment.bottomCenter,
this.padding = const EdgeInsets.symmetric(vertical: 8, horizontal: 24),
this.borderRadius = 40,
this.textStyle = const TextStyle(
color: Colors.white, // Ensure text is visible on gradient
fontWeight: FontWeight.bold,
fontSize: 20,
),
});