KdGaugeView constructor

KdGaugeView({
  1. GlobalKey<State<StatefulWidget>>? key,
  2. double speed = 0,
  3. TextStyle speedTextStyle = const TextStyle(color: Colors.black, fontSize: 60, fontWeight: FontWeight.bold),
  4. String unitOfMeasurement = 'Km/Hr',
  5. TextStyle unitOfMeasurementTextStyle = const TextStyle(color: Colors.black, fontSize: 30, fontWeight: FontWeight.w600),
  6. required double minSpeed,
  7. required double maxSpeed,
  8. TextStyle minMaxTextStyle = const TextStyle(color: Colors.black, fontSize: 20),
  9. List<double> alertSpeedArray = const [],
  10. List<Color> alertColorArray = const [],
  11. double gaugeWidth = 10,
  12. Color baseGaugeColor = Colors.transparent,
  13. Color inactiveGaugeColor = Colors.black87,
  14. Color activeGaugeColor = Colors.green,
  15. double innerCirclePadding = 30,
  16. Color divisionCircleColors = Colors.blue,
  17. Color subDivisionCircleColors = Colors.blue,
  18. bool animate = false,
  19. Duration duration = const Duration(milliseconds: 400),
  20. int fractionDigits = 0,
  21. Widget? child,
  22. Gradient? activeGaugeGradientColor,
})

Implementation

KdGaugeView(
    {GlobalKey? key,
    this.speed = 0,
    this.speedTextStyle = const TextStyle(
      color: Colors.black,
      fontSize: 60,
      fontWeight: FontWeight.bold,
    ),
    this.unitOfMeasurement = 'Km/Hr',
    this.unitOfMeasurementTextStyle = const TextStyle(
      color: Colors.black,
      fontSize: 30,
      fontWeight: FontWeight.w600,
    ),
    required this.minSpeed,
    required this.maxSpeed,
    this.minMaxTextStyle = const TextStyle(
      color: Colors.black,
      fontSize: 20,
    ),
    this.alertSpeedArray = const [],
    this.alertColorArray = const [],
    this.gaugeWidth = 10,
    this.baseGaugeColor = Colors.transparent,
    this.inactiveGaugeColor = Colors.black87,
    this.activeGaugeColor = Colors.green,
    this.innerCirclePadding = 30,
    this.divisionCircleColors = Colors.blue,
    this.subDivisionCircleColors = Colors.blue,
    this.animate = false,
    this.duration = const Duration(milliseconds: 400),
    this.fractionDigits = 0,
    this.child,
    this.activeGaugeGradientColor})
    : assert(alertSpeedArray.length == alertColorArray.length,
          'Alert speed array length should be equal to Alert Speed Color Array length'),
      super(key: key);