area property

  1. @override
double get area
override

Area of this quadrilateral using the shoelace formula.

Implementation

@override
double get area {
  // Shoelace formula
  final sum = a.x * b.y - b.x * a.y +
      b.x * c.y - c.x * b.y +
      c.x * d.y - d.x * c.y +
      d.x * a.y - a.x * d.y;
  return sum.abs() / 2;
}