layout method

  1. @override
void layout(
  1. LineProps layoutProps,
  2. List<DynamicData> dataSet
)
override

Implementation

@override
void layout(LineProps layoutProps, List<DynamicData> dataSet) {
  Rect rect = axisSize.rect;
  if (vertical) {
    rect = Rect.fromLTWH(layoutProps.start.dx, layoutProps.start.dy, rect.width, layoutProps.start.distance2(layoutProps.end));
  } else {
    rect = Rect.fromLTWH(layoutProps.start.dx, layoutProps.start.dy, layoutProps.start.distance2(layoutProps.end), rect.height);
  }
  _axisSize = AxisSize(rect, rect.topLeft, rect.topRight, axisSize.length);
  super.layout(layoutProps, dataSet);
}