toBase64 method

String toBase64()

Returns the contents encoded as base64.

Implementation

String toBase64() {
  if (value is String && format == KeyFormat.base64) {
    return value as String;
  }
  return base64Encode(toBytes());
}