setPointValues method

void setPointValues()

Implementation

void setPointValues() {
  try {
    Size size = globalKey.currentContext?.size ?? Size.zero;
    double pointWidth = _getPointWidth(size.width);
    List<Offset> pointCenter = [];
    for (int x = 1; x <= 3; x++) {
      for (int y = 1; y <= 3; y++) {
        Offset center = Offset((y - 1) * pointWidth + pointWidth / 2,
            (x - 1) * pointWidth + pointWidth / 2);
        pointCenter.add(center);
      }
    }
    for (int index = 0; index < pointCenter.length; index++) {
      _points[index].centerPoint = pointCenter[index];
    }
  } catch (e) {
    // print('error: $e');
  }
}