Point.fromWKT constructor Null safety
- 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));
}