Point.fromWKT constructor

  1. @override
Point.fromWKT(
  1. String wkt
)

Creates a Point from a WKT String.

Example:

Point.fromWKT('POINT(1 2)');

Implementation

@override
factory Point.fromWKT(String wkt) {
  final coordinates = wkt.split('(')[1].split(')')[0];
  return Point(Coordinate.fromWKT(coordinates));
}