toEscaped method
Returns an escaped string. The following characters are escaped
tab
newline
carriage return
"
'
$
Example:
print("Hello 'world' \n".toEscaped());
=> 'Hello \'world\' \n'
Implementation
String toEscaped({String Function(int charCode)? encode}) =>
Transform.toEscape(this, encode: encode);