Point2.parse constructor

Point2.parse(
  1. String text, {
  2. ParseCoords? parser,
})

A point parsed from text with coordinates in order: x, y.

If parser is null, then WKT text like "10.0 20.0" is expected.

Throws FormatException if cannot parse.

Implementation

factory Point2.parse(String text, {ParseCoords? parser}) => parser != null
    ? Point2.from(parser.call(text))
    : parseWktPoint<Point2>(text, Point2.coordinates);