PieChart constructor

const PieChart(
  1. PieChartData data, {
  2. Key? key,
  3. Duration swapAnimationDuration = defaultDuration,
  4. Curve swapAnimationCurve = Curves.linear,
})

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

Implementation

const PieChart(
  this.data, {
  super.key,
  Duration swapAnimationDuration = defaultDuration,
  Curve swapAnimationCurve = Curves.linear,
}) : super(
        duration: swapAnimationDuration,
        curve: swapAnimationCurve,
      );