ansi_color.dart 486 B

12345678910111213141516171819202122232425
  1. class AnsiColor {
  2. static String red(Object text) {
  3. return '\x1b[31m$text\x1b[39m';
  4. }
  5. static String green(Object text) {
  6. return '\x1b[32m$text\x1b[39m';
  7. }
  8. static String yellow(Object text) {
  9. return '\x1b[33m$text\x1b[39m';
  10. }
  11. static String blue(Object text) {
  12. return '\x1b[34m$text\x1b[39m';
  13. }
  14. static String magenta(Object text) {
  15. return '\x1b[35m$text\x1b[39m';
  16. }
  17. static String cyan(Object text) {
  18. return '\x1b[36m$text\x1b[39m';
  19. }
  20. }