discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

selfSnap method

  1. @override
Vector2? selfSnap(
  1. Vector2 raw,
  2. double apertureWorld
)

A stored placed point this raw point should land on exactly, or null.

Implementation

@override
Vector2? selfSnap(Vector2 raw, double apertureWorld) {
  if (_walls >= 2 && raw.distanceTo(points.first) <= apertureWorld) {
    return points.first;
  }
  if (_walls >= 1 && raw.distanceTo(points.last) <= apertureWorld) {
    return points.last;
  }
  return null;
}