write method
Writes text
to the console using the color based on _type
.
Implementation
void write(String text) {
switch (_type) {
case PrintType.success:
_printSuccess(text);
break;
case PrintType.error:
_printError(text);
break;
case PrintType.warning:
_printWarning(text);
break;
default:
_printText(text);
}
}