decodeBase64Packet static method
Implementation
static decodeBase64Packet(String msg, String binaryType) {
var type = packetTypeList[msg.codeUnitAt(0)];
var data = base64.decode(utf8.decode(msg.substring(1).codeUnits));
if (binaryType == 'arraybuffer') {
var abv = Uint8List(data.length);
for (var i = 0; i < abv.length; i++) {
abv[i] = data[i];
}
return {'type': type, 'data': abv.buffer};
}
return {'type': type, 'data': data};
}