getDisplayName static method
Implementation
static String getDisplayName(String nameOrPath) {
if (nameOrPath.contains('/')) {
List names = nameOrPath.split('/');
nameOrPath = names.removeLast();
while (nameOrPath == '' && names.isNotEmpty) {
nameOrPath = names.removeLast();
}
}
if (nameOrPath.contains('%')) {
nameOrPath = UriComponentDecoder.decode(nameOrPath);
}
return nameOrPath;
}