getPolicyBase64 static method

dynamic getPolicyBase64(
  1. String policyText
)

获取police的base64

Implementation

static getPolicyBase64(String policyText) {
  //进行utf8编码
  List<int> policyUtf8 = utf8.encode(policyText);
  //进行base64编码
  String policyBase64 = base64.encode(policyUtf8);
  return policyBase64;
}