tryParseFileExt static method

String? tryParseFileExt(
  1. String fileName
)

Like parseFileExt except that this function returns null where a similar call to parseFileExt would throw a FormatException.

Implementation

static String? tryParseFileExt(String fileName) {
  try {
    return parseFileExt(fileName);
  } on FormatException {
    return null;
  }
}