XPathDouble.parse constructor

XPathDouble.parse(
  1. String text, [
  2. XPathType type = xsDouble
])

Parses text into an XPathDouble of optional type, throwing a FormatException if invalid.

Implementation

factory parse(String text, [XPathType type = xsDouble]) =>
    tryParse(text, type) ??
    (throw FormatException('Invalid float/double: "$text"'));