handleLegendItemTapped method

  1. @override
void handleLegendItemTapped(
  1. LegendItem item,
  2. bool isToggled
)
override

Implementation

@override
void handleLegendItemTapped(LegendItem item, bool isToggled) {
  super.handleLegendItemTapped(item, isToggled);
  // Resets `_isLegendToggled` to `true` to handle legend inner and outer radius animations.
  if (item is ChartLegendItem && item.pointIndex != -1) {
    final RadialBarSegment segment =
        segmentAt(item.pointIndex) as RadialBarSegment;
    segment._isLegendToggled = true;
  }
}