title: Flutter: How to search a 'set' for an object based on the object's field value
body: <p>As per the title how do I search a 'Set' for an object by the objects field value. The following is incorrect code but hopefully gives the idea. The closest i could find was <a href="https://stackoverflow.com/questions/8249002/how-to-search-for-an-object-in-listobject-having-its-field-value">How to search for an object in List&lt;object&gt; having its field value</a> but the same doesn't seem to apply.</p>
  
  <pre><code>class MyClass {
    final String a;
    final int b;
    final double c;
    MyClass({this.a, this.b, this.c});
  }
  
  class Check{
     Set&lt;MyClass&gt; mSet = new Set&lt;MyClass&gt;();
     contains() {
       mSet.add(new MyClass(a: "someString1", b:3, c:2.0));
       mSet.add(new MyClass(a: "someString2", b:1, c:3.0));
       mSet.add(new MyClass(a: "someString3", b:2, c:1.0));
       //following is not correct, but to get the idea...
       print(mSet.contains((item) =&gt; item.a == "someString1"));
       //need to return true
     }
  }
  
  &gt;FALSE
  </code></pre>
  
  <p>Same question might apply to Set.where,  Set.remove ...etc for instance if I add</p>
  
  <pre><code>var b = mSet.where((item) =&gt; item.a == "someString1");
  </code></pre>
  
  <p>b results in an iterable with <strong>all</strong> values of the Set.</p>