Skip to content

Instantly share code, notes, and snippets.

@JamesHovious
Created October 5, 2014 05:08
Show Gist options
  • Save JamesHovious/8fea4689079d1105df12 to your computer and use it in GitHub Desktop.
Save JamesHovious/8fea4689079d1105df12 to your computer and use it in GitHub Desktop.
Random icon with Dart
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