tryToNumFormatted method

num? tryToNumFormatted(
  1. String format,
  2. String? locale
)

Attempts toNumFormatted, returning null on failure.

Implementation

num? tryToNumFormatted(String format, String? locale) {
  try {
    return toNumFormatted(format, locale);
  } catch (_) {
    return null;
  }
}