tryParse static method

Point2i? tryParse(
  1. String text, {
  2. ParseCoordsInt? parser,
})

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

If parser is null, then WKT text like "10 20" is expected.

Returns null if cannot parse.

Implementation

static Point2i? tryParse(String text, {ParseCoordsInt? parser}) {
  try {
    return Point2i.parse(text, parser: parser);
  } on Exception {
    return null;
  }
}