breaking out of a switch within a foreach loop closure
问题 I have the following 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', $[