Created
May 19, 2013 17:54
-
-
Save damondouglas/5608412 to your computer and use it in GitHub Desktop.
How to use Iterable.singleWhere
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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