handleLegendItemTapped method
void
handleLegendItemTapped(
- LegendItem item,
- 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;
}
}