SparkChartPlotBand constructor

const SparkChartPlotBand({
  1. Color color = const Color.fromRGBO(191, 212, 252, 0.5),
  2. double? start,
  3. double? end,
  4. Color? borderColor,
  5. double borderWidth = 0,
})

Creates an instance of spark chart plot band to add and customizes the plot band in spark chart widget. To make, the plot band visible, define the value to its start and end property.

@override
Widget build(BuildContext context) {
 return Scaffold(
   body: Center(
       child: SfSparkAreaChart(
     plotBand: SparkChartPlotBand(start: 15, end: 25),
     data: <double>[18, 24, 30, 14, 28],
        )
     ),
  );
}

Implementation

const SparkChartPlotBand(
    {this.color = const Color.fromRGBO(191, 212, 252, 0.5),
    this.start,
    this.end,
    this.borderColor,
    this.borderWidth = 0});