tryGetNewNameWithPath static method
Like getNewNameWithPath except that this function returns null
where a
similar call to getNewNameWithPath would throw a FormatException.
Implementation
static String? tryGetNewNameWithPath(String filePath, String newFileName) {
try {
return getNewNameWithPath(filePath, newFileName);
} on FormatException {
return null;
}
}