【发布时间】:2019-11-18 05:42:00
【问题描述】:
我有一个 base64 格式的 pdf 内容,我需要在颤振应用程序的容器中显示它。
我正在尝试使用图像、pdf 并从 dart 转换包,但图像类出现错误,我不知道如何显示图像。
List<int> pdfDataBytes = base64.decode(fileContent);
Image img = decodeImage(pdfDataBytes);
PdfImage image = PdfImage(
pdf,
image: img.data.buffer.asUint8List(),
width: img.width,
height: img.height);
这是图像类中的错误消息:尝试对其中一个导入指令使用“作为前缀”,或者对除一个导入之外的所有导入指令隐藏名称
【问题讨论】: