addNewPath method

void addNewPath(
  1. Offset pos
)

Implementation

void addNewPath(Offset pos) {
  if (!taskStarted) {
    taskStarted = true;
    startTime = DateTime.now();
  }
  if (!_isDraging) {
    _isDraging = true;
    Path path = Path();
    path.moveTo(pos.dx, pos.dy);
    // starting point - also removes errors when trying to remove paths not yet drawn
    path.addOval(Rect.fromLTWH(pos.dx, pos.dy, 1, 1));
    _paths.add(path);
  }
}