Created
October 5, 2014 05:08
-
-
Save JamesHovious/8fea4689079d1105df12 to your computer and use it in GitHub Desktop.
Random icon with Dart
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
import 'dart:html'; | |
import 'dart:math'; | |
void main() { | |
var rand = new Random(); | |
var randomIcon = querySelector('#randomIcon'); | |
if (rand.nextBool()){ | |
randomIcon.attributes['class'] = 'fa fa-android'; | |
}else{ | |
randomIcon.attributes['class'] = 'fa fa-apple'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment