base64Encode static method

String base64Encode(
  1. String data
)

字符串转 base64 编码

Implementation

static String base64Encode(String data) {
  var content = utf8.encode(data);
  var digest = base64.encode(content);
  return digest;
}