decodeBase64 static method
Implementation
static String decodeBase64(String data) {
// 网上找的很多都是String.fromCharCodes,这个中文会乱码
//String txt1 = String.fromCharCodes(bytes);
// var str = String.fromCharCodes(base64Decode(data));
if (data.isNotEmpty) {
Uint8List base64deBody = base64Decode(data);
return Utf8Decoder().convert(base64deBody);
} else {
return "";
}
}