toBase64 method
Encodes the string to Base64.
Example:
"Hello".toBase64(); // Returns "SGVsbG8="
Implementation
String toBase64() {
if (isEmpty) return this;
return base64Encode(utf8.encode(this));
}
Encodes the string to Base64.
Example:
"Hello".toBase64(); // Returns "SGVsbG8="
String toBase64() {
if (isEmpty) return this;
return base64Encode(utf8.encode(this));
}