PointsColumn constructor
PointsColumn({
- required List<
StackableValuePoint> points,
Construct column from the passed points
.
Passed points are assumed to:
- Be configured with appropriate
predecessorPoint
- Not stacked Creates members stackedNegativePoints, stackedPositivePoints which exist only to be stacked, so the constructor stacks them on creation.
Implementation
PointsColumn({
required List<StackableValuePoint> points,
}) {
// todo-1 add validation that points are not stacked
stackableValuePoints = points;
stackedPositivePoints =
_selectThenCollectStacked(points: stackableValuePoints, selector: (point) => point.dataY >= 0);
stackedNegativePoints =
_selectThenCollectStacked(points: stackableValuePoints, selector: (point) => point.dataY < 0);
}