LYGradientSlider constructor

const LYGradientSlider({
  1. Key? key,
  2. required double value,
  3. required ValueChanged<double> onChanged,
  4. double height = 12,
  5. List<Color> trackColors = const [Colors.green, Colors.green, Colors.amber, Colors.red, Colors.red],
  6. double? borderWidth = 0,
  7. Color? borderColor = Colors.grey,
})

Implementation

const LYGradientSlider({
  super.key,
  required this.value,
  required this.onChanged,

  this.height = 12, // DEFAULT HEIGHT:12
  this.trackColors = const [
    Colors.green,
    Colors.green,
    Colors.amber,
    Colors.red,
    Colors.red,
  ], // DEFAULT COLOR GRADIENT FROM GREEN TO RED

  this.borderWidth = 0,
  this.borderColor = Colors.grey,
});