Sparkline constructor

Sparkline({
  1. Key? key,
  2. required List<double> data,
  3. double lineWidth = 1.0,
  4. Color lineColor = Colors.lightBlue,
  5. Gradient? lineGradient,
  6. PointsMode pointsMode = PointsMode.none,
  7. int? pointIndex,
  8. double pointSize = 4.0,
  9. Color pointColor = const Color(0xFF0277BD),
  10. bool sharpCorners = false,
  11. bool useCubicSmoothing = false,
  12. double cubicSmoothingFactor = 0.15,
  13. FillMode fillMode = FillMode.none,
  14. Color fillColor = const Color(0xFF81D4FA),
  15. Gradient? fillGradient,
  16. double fallbackHeight = 100.0,
  17. double fallbackWidth = 300.0,
  18. bool enableGridLines = false,
  19. String gridLinelabel(
    1. double gridLineValue
    )?,
  20. Color gridLineColor = Colors.grey,
  21. int gridLineAmount = 5,
  22. double gridLineWidth = 0.5,
  23. Color gridLineLabelColor = Colors.grey,
  24. bool enableThreshold = false,
  25. double thresholdSize = 0.3,
  26. double? max,
  27. double? min,
  28. String gridLinelabelPrefix = "",
  29. int gridLineLabelPrecision = 3,
  30. bool averageLine = false,
  31. bool averageLabel = true,
  32. bool maxLine = false,
  33. bool maxLabel = true,
  34. List? kLine,
  35. Color? backgroundColor,
})

Creates a widget that represents provided data in a Sparkline chart.

Implementation

Sparkline({
  Key? key,
  required this.data,
  this.lineWidth = 1.0,
  this.lineColor = Colors.lightBlue,
  this.lineGradient,
  this.pointsMode = PointsMode.none,
  this.pointIndex,
  this.pointSize = 4.0,
  this.pointColor = const Color(0xFF0277BD), //Colors.lightBlue[800]
  this.sharpCorners = false,
  this.useCubicSmoothing = false,
  this.cubicSmoothingFactor = 0.15,
  this.fillMode = FillMode.none,
  this.fillColor = const Color(0xFF81D4FA), //Colors.lightBlue[200]
  this.fillGradient,
  this.fallbackHeight = 100.0,
  this.fallbackWidth = 300.0,
  this.enableGridLines = false,
  this.gridLinelabel,
  this.gridLineColor = Colors.grey,
  this.gridLineAmount = 5,
  this.gridLineWidth = 0.5,
  this.gridLineLabelColor = Colors.grey,
  // this.labelPrefix = "\$",
  this.enableThreshold = false,
  this.thresholdSize = 0.3,
  this.max,
  this.min,
  this.gridLinelabelPrefix = "",
  this.gridLineLabelPrecision = 3,
  this.averageLine = false,
  this.averageLabel = true,
  this.maxLine = false,
  this.maxLabel = true,
  this.kLine,
  this.backgroundColor,
}) : super(key: key);