LegendItemContainer constructor
LegendItemContainer({
- required String label,
- required LabelStyle labelStyle,
- required Paint indicatorPaint,
- required ChartOptions options,
Implementation
LegendItemContainer({
required String label,
required LabelStyle labelStyle,
required ui.Paint indicatorPaint,
required ChartOptions options,
}) :
// We want to only create as much as we can in layout for clarity,
// as a price, need to hold on on label and style from constructor
_label = label,
_labelStyle = labelStyle,
_indicatorPaint = indicatorPaint,
_options = options,
super() {
// There is no need to create the _indicatorRect in the constructor,
// as layout will move it, recreating it.
// So _indicatorPaint is argument, _indicatorRect is created in layout().
}