PostgresPolygon class final

A closed shape bounded by straight edges between its points, the value of a Postgres polygon column.

PostgresPolygon.parse('((0,0),(1,1),(1,0))').points.length // 3

Postgres has no = operator for polygon, so an eq filter on a polygon column fails on the server.

Implemented types
Annotations
  • @experimental

Constructors

PostgresPolygon(List<PostgresPoint> points)
PostgresPolygon.parse(String literal)
Parses the ((x1,y1),…) literal Postgres emits for a polygon.
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
literal → String
The literal Postgres accepts and emits, ((0,0),(1,1),(1,0)).
no setteroverride
points → List<PostgresPoint>
The corners of the polygon, in order.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override