applyParentOffset method

  1. @override
void applyParentOffset(
  1. Offset offset
)

Allow a parent container to move this Container after layout.

Override if parent move needs to propagate to internals of this Container.

Implementation

@override
void applyParentOffset(ui.Offset offset) {
  if (!chartTopContainer.data.chartOptions.legendOptions.isLegendContainerShown) {
    return;
  }
  // super not really needed - only child containers are offset.
  super.applyParentOffset(offset);

  for (LegendItemContainer legendItemContainer in _legendItemContainers) {
    legendItemContainer.applyParentOffset(offset);
  }
}