Are you suggesting?

String _wrapInQuotes(String s){
	final escaped = s.replaceAll(r'\', r'\\').replaceAll(r'"', r'\"');
	return '"${escaped}"';
}