title: Dart: Keep in a list of objects with duplicate property 'x', the object that has the max property 'y'
body: <p>I have a list of objects and each object has a <code>String</code> property <code>datetime</code> and an <code>int</code> property <code>steps</code>. Some of the objects inside the list have the same value in <code>datetime</code> property. In this case, I want to keep in the list, the one object between all the duplicates, that has the greatest value of <code>steps</code>. For example:</p>
  <p><code>[ Object(a: '1/1/2021', b: 100), Object(a: '1/2/2021', b: 110), Object(a: '1/3/2021', b: 115), Object(a: '1/3/2021', b: 140), Object(a: '1/4/2021', b: 100)]</code></p>
  <p>Should be like:</p>
  <p><code>[ Object(a: '1/1/2021', b: 100), Object(a: '1/2/2021', b: 110), Object(a: '1/3/2021', b: 140), Object(a: '1/4/2021', b: 100)]</code></p>
  <p>Can you help me by suggesting an efficient way of solving this issue?</p>