在我的应用程序中,我CashedNetworkImage
用来显示我的图像。问题是我需要知道加载了什么图像,为此我试图在加载图像后转换图像,Base64
以便将其与另一个图像进行比较。
但我不能使转换工作......
child: CachedNetworkImage(
imageBuilder: (context, imageProvider) {
// 1. convert image provider to base64 String
// 2. compare it to sample image
// 3. display the image
},
imageUrl: widget.memory.imageUrl,
fit: BoxFit.cover,
progressIndicatorBuilder:
(context, url, downloadProgress) => Center(
child: CircularProgressIndicator(
value: downloadProgress.progress),
),
errorWidget: (context, url, error) => Icon(Icons.error),
),
我在这方面找不到任何东西.. 任何帮助表示赞赏。如果您需要更多信息,请告诉我!