Guest User

Untitled

a guest
Dec 13th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import 'dart:math';
  2.  
  3. Random random = new Random();
  4.  
  5. String generateRandomHexColor(){
  6. int length = 6;
  7. String chars = '0123456789ABCDEF';
  8. String hex = '#';
  9. while(length-- > 0) hex += chars[(random.nextInt(16)) | 0];
  10. return hex;
  11. }
Add Comment
Please, Sign In to add comment