title: breaking out of a switch within a foreach loop closure
body: <p>I have the following code</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code> void onSelectionChangedFiredSources( Event event, var detail,
                                  SelectCheckboxMenuComponent target)
    {
      // getItemModels returns a list of objects
        getItemModels( target.selectedItems )
          ..forEach( (item)
            {          
               switch( item.label )
               {
                 case 'Ear':
                   toggleDialog( 'paper-dialog-transition-center',
                                  $['ear-side-dialog']);
                   break;
  
                 case 'Eye':
                   toggleDialog( 'paper-dialog-transition-center',
                                  $['eye-side-dialog']);
                   break;
  
                 case 'Nostril':
                   toggleDialog( 'paper-dialog-transition-center',
                                  $['nostril-side-dialog']);
                   break;
  
                 case 'Thorax':
                   toggleDialog( 'paper-dialog-transition-center',
                                  $['thorax-side-dialog']);
                   break;
  
                 default:
                   srcDataMap.add( item.label, item.selected);
               }   
            });
    }
  </code></pre>
  
  <p>When a case is triggered, I would like to break out of the foreach loop.</p>
  
  <p>Note that each time the selection changes, all selections are return by the target.selectedItems expression. So if 'Ear' is the first selection, the loop is executed and when 'Eye' is then selected the list return will have both Ear and Eye.
  How is this best done?
  Thanks</p>