String name = "${name} ${hoge}";
String name = "hogehoge"; name = name.replaceAll("\n", "");
print(name.length); // 20
if (name.length > 20) { name = name.substring(0, 20); }