Polygon class

A class for representing two-dimensional Polygon defined with List<Point<num>> points.

Constructors

Polygon(List<Offset> points)
Create a Polygon with vertices at points. Pass a List<Point<num>>

Properties

hashCode int
The hash code for this object.
no setterinherited
name String?
getter/setter pair
points List<Offset>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

contains(num px, num py) bool
returns true if (x,y) is present inside Polygon
isPointInside(Offset i) bool
returns true if Point is present inside Polygon
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getNearestPoint(List<Offset> points, Offset latestPoints) Offset?
Get the nearest point.