printError function

void printError(
  1. Object? obj
)

Print in red colour

Used for errors and exceptions that cause the program to malfunction

Implementation

void printError(Object? obj) {
  print('\x1B[31m' + obj.toString() + '\x1B[0m');
}