title: Return a value from a list of Objects in Dart based on a condition
body: <p>I have a list of Country objects: countryName, countryCode, currencyName, currencyCode, countryCapitalCity, countryLatitude, countryLongitude. The objects are store as follows:</p>
  <pre><code>    Country('Ghana', '+233', 'Ghanaian Cedi', 'GHS', 'Accra', 5.603717,
          -0.186964, 22),
      Country('Guinea', '+224', 'Guinean Franc', 'GNF', 'Conakry', 9.641185,
          -13.578401, 23),
      Country('Guinea-Bissau', '+245', 'West African CFA Franc', 'XOF', 'Bissau',
          11.881655, -15.617794, 24),
      Country('Ivory Coast', '+225', 'West African CFA Franc', 'XOF',
          'Yamoussoukro', 6.827623, -5.289343, 25),
  </code></pre>
  <p>I have instantiated the list as follows:</p>
  <pre><code>    List&lt;Country&gt; _countries = Country.countries;
  </code></pre>
  <p>I have a variable: userCountryCode which will be provided - for example take a case of +245. I want to go through the list of _countries and return the values 11.881655, -15.617794, which are mapping to the <em>countryLatitude, countryLongitude</em> properties of the object.</p>
  <p>The following has not worked:</p>
  <pre><code>    List&lt;Country&gt; dumy =
         _countries.where((element) =&gt; element.countryCode == result).toList();
  </code></pre>