title: Getting the last element of a list in dart
body: <p>In dart, how to access the last element of a list?</p>
  <pre><code>var lst = [&quot;element1&quot; , &quot;element2&quot; , &quot;element3&quot;];
  </code></pre>
  <p>My list is dynamic.</p>