fileName function
Return the last segment of the file path.
Implementation
String fileName(FileSystemEntity entity) {
final name = entity.path;
final index = name.lastIndexOf(_sep);
return (index != -1 ? name.substring(index + 1) : name);
}
Return the last segment of the file path.
String fileName(FileSystemEntity entity) {
final name = entity.path;
final index = name.lastIndexOf(_sep);
return (index != -1 ? name.substring(index + 1) : name);
}