title: How to sort list of file in order of latest to oldest
body: <p>Currently, I am fetching a list of video files present in the directory using the following code</p>
  <pre><code>var videoList = _videoDir
            .listSync()
            .map((item) =&gt; item.path)
            .where((item) =&gt; item.endsWith(&quot;.mp4&quot;))
            .toList(growable: true);
  </code></pre>
  <p>This generates a video list in random order. How can I fetch files in order of latest to oldest?</p>
  <h1>Update</h1>
  <p>I already tried to use the <code>startsync()</code> function at the end of the code but it cant be used on the type String when used after <code>.toList()</code></p>