tryDecode static method

Rational? tryDecode(
  1. String? value
)

Attempts to decode a string to a Rational.

Returns null if parsing fails or if the input is null. Use this for user input or untrusted data sources.

Implementation

static Rational? tryDecode(String? value) => RationalParsing.tryFromString(value);