BarChart constructor

const BarChart(
  1. BarChartData data, {
  2. Key? chartRendererKey,
  3. Key? key,
  4. Duration swapAnimationDuration = const Duration(milliseconds: 150),
  5. Curve swapAnimationCurve = Curves.linear,
})

data determines how the BarChart should be look like, when you make any change in the BarChartData, it updates new values with animation, and duration is swapAnimationDuration. also you can change the swapAnimationCurve which default is Curves.linear.

Implementation

const BarChart(
  this.data, {
  this.chartRendererKey,
  super.key,
  Duration swapAnimationDuration = const Duration(milliseconds: 150),
  Curve swapAnimationCurve = Curves.linear,
}) : super(
        duration: swapAnimationDuration,
        curve: swapAnimationCurve,
      );