handleLegendItemTapped method
Implementation
@override
void handleLegendItemTapped(LegendItem item, bool isToggled) {
super.handleLegendItemTapped(item, isToggled);
controller.isVisible = !isToggled;
if (controller.isVisible == !isToggled) {
item.onToggled?.call();
}
if (trendlineContainer != null) {
trendlineContainer!.updateLegendState(item, isToggled);
markNeedsLegendUpdate();
}
markNeedsUpdate();
}