wrap method
Wraps value with the escape value for this code, followed by
resetAll.
If forScript is true, the return value is an unescaped literal. The
value of ansiOutputEnabled is also ignored.
Returns value unchanged if
valueisnullor empty- both ansiOutputEnabled and
forScriptarefalse. - type is AnsiCodeType.reset
Implementation
String? wrap(String? value, {bool forScript = false}) =>
_isNoop(type == AnsiCodeType.reset, value, forScript)
? value
: '${_escapeValue(forScript: forScript)}$value'
'${reset!._escapeValue(forScript: forScript)}';