DarkButton constructor
const
DarkButton({
- Key? key,
- required String text,
- VoidCallback? onPressed,
- double width = 200,
- double height = 50,
- Color backgroundColor = const Color(0xFF0A0A0A),
- Color textColor = Colors.white,
- Color normalBorderColor = const Color(0xFF404040),
- Color hoverBorderColor = const Color(0xFF3B82F6),
- double borderWidth = 1.0,
- double borderRadius = 25.0,
- TextStyle? textStyle,
- Duration animationDuration = const Duration(seconds: 3),
- Duration hoverTransitionDuration = const Duration(milliseconds: 300),
- bool isEnabled = true,
- double glowRadius = 2.0,
- double lightSegmentLength = 0.15,
Implementation
const DarkButton({
Key? key,
required this.text,
this.onPressed,
this.width = 200,
this.height = 50,
this.backgroundColor = const Color(0xFF0A0A0A),
this.textColor = Colors.white,
this.normalBorderColor = const Color(0xFF404040),
this.hoverBorderColor = const Color(0xFF3B82F6),
this.borderWidth = 1.0,
this.borderRadius = 25.0,
this.textStyle,
this.animationDuration = const Duration(seconds: 3),
this.hoverTransitionDuration = const Duration(milliseconds: 300),
this.isEnabled = true,
this.glowRadius = 2.0,
this.lightSegmentLength = 0.15,
}) : assert(
lightSegmentLength >= 0.0 && lightSegmentLength <= 1.0,
'lightSegmentLength must be between 0.0 and 1.0',
),
super(key: key);