Last path segment, for both / and \ separated paths.
/
\
String fileBaseName(String path) => path.split(RegExp(r'[\\/]')).last;