Skip to content

Instantly share code, notes, and snippets.

@damondouglas
Created May 19, 2013 17:54
Show Gist options
  • Save damondouglas/5608412 to your computer and use it in GitHub Desktop.
Save damondouglas/5608412 to your computer and use it in GitHub Desktop.
How to use Iterable.singleWhere
var statemap = {
"hide":"icon-double-angle-up icon-1x",
"show":"icon-double-angle-down icon-1x"
};
var itr = statemap.keys;
var value = "hide";
value = itr.singleWhere((e){
return e != value;
});
print(value); // show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment