static String encodeCookie(String cookie) { final bytes = convert.utf8.encode(cookie); final base64Str = convert.base64.encode(bytes); return base64Str; }