title: How to get the File Extension from a string Path
body: <p>I've got file path saved in variable and I want to get the file type extension by using path package <a href="https://pub.dev/packages/path" rel="noreferrer">https://pub.dev/packages/path</a> So far I managed to do it by splitting the string like this</p>
  
  <pre class="lang-dart prettyprint-override"><code>final path = "/some/path/to/file/file.dart";
  print(path.split(".").last); //prints dart
  </code></pre>
  
  <p>Is there any way to achieve this with path package?</p>