DarkButton constructor

const DarkButton({
  1. Key? key,
  2. required String text,
  3. VoidCallback? onPressed,
  4. double width = 200,
  5. double height = 50,
  6. Color backgroundColor = const Color(0xFF0A0A0A),
  7. Color textColor = Colors.white,
  8. Color normalBorderColor = const Color(0xFF404040),
  9. Color hoverBorderColor = const Color(0xFF3B82F6),
  10. double borderWidth = 1.0,
  11. double borderRadius = 25.0,
  12. TextStyle? textStyle,
  13. Duration animationDuration = const Duration(seconds: 3),
  14. Duration hoverTransitionDuration = const Duration(milliseconds: 300),
  15. bool isEnabled = true,
  16. double glowRadius = 2.0,
  17. 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);