didUpdate method
Will be called by the chart when it was updated.
Returns true if this chart data has changed with the chart
widget update.
Implementation
@override
bool didUpdate(ChartData? oldData) {
if (oldData == null) {
return super.didUpdate(oldData);
}
final bool superDidUpdated = super.didUpdate(oldData);
final CombinedBarrier combinedBarrier = oldData as CombinedBarrier;
final bool verticalBarrierDidUpdated = verticalBarrier.didUpdate(
combinedBarrier.verticalBarrier,
);
return superDidUpdated || verticalBarrierDidUpdated;
}