encode String to Base64 string
static String str2base64(String str) { var bytes = utf8.encode(str); return base64.encode(bytes); }