fileExt function
Return the file's extension without the period. This will return null
if
there is no extension.
Implementation
String? fileExt(FileSystemEntity entity) {
final name = fileName(entity);
final index = name.indexOf('.');
return index != -1 && index < name.length ? name.substring(index + 1) : null;
}