base64Encoded property

String base64Encoded

Encodes the string into a base64 encoded string. Useful for encoding data that needs to be stored or transferred as plain text.

Example usage:

print('Hello World'.base64Encoded); // Output: 'SGVsbG8gV29ybGQ='

Implementation

String get base64Encoded => base64Encode(utf8.encode(this));